i want to run a minikube VM. with following code
minikube start --vm-driver hyperv --hyperv-virtual-switch "minikube_switch" --logtostderr -v7
It keeps running but when i try to ask the minikube status it says this :
E0502 10:12:57.507689 7704 status.go:297] failed to get driver ip: getting IP: IP not found
E0502 10:12:57.509688 7704 status.go:207] status error: getting IP: IP not found
minikube
type: Control Plane
host: Error
kubelet: Nonexistent
apiserver: Nonexistent
kubeconfig: Nonexistent
Can anyone help me with this problem?
Related
I am trying to setup aerokube moon on a linux machine(Ubuntu 16.04) .
Steps followed :
minikube installed and ingress is enabled.
moon installed using https://aerokube.com/moon/latest/#install-helm .
started minikube using docker driver
$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
kubectl get pods -n moon
NAME READY STATUS RESTARTS AGE
moon-5f6fd5f9fd-7b945 3/3 Running 0 10m
moon-5f6fd5f9fd-fcct6 3/3 Running 0 10m
$minikube tunnel
Status:
machine: minikube
pid: 148130
route: 10.96.0.0/12 -> xxx.xxx.xx.x
minikube: Running
services: []
errors:
minikube: no errors
router: no errors
loadbalancer emulator: no errors
$
cat /etc/hosts
127.0.0.1 localhost moon.aerokube.local
xxx.xxx.xxx.xxx moon.aerokube.local --> this ip is output of `$minikube ip`
Issue 1 : when I try to access http://moon.aerokube.local/ .I get
Issue2 how to change the default port for selenium
I would like to change the default port for selenium in moon as my 8080 and 4444 port are already occupied.
I would like to use some other port for moon ui and /wd/hub
I assume ,this probably will be accessible from that linux machine itself(I can't check directly on that machine) as it is pointed to localhost in /etc/host. but I dont know how to make it accessible from other places (facing issues no 2 mentioned in this post) like from our laptops for people working on this project .
Please help
I want to have a container that can access and run kubectl command on my host machine. Here is what I have:
I have installed Kubernetes and Minikube on my host machine.
I used this docker container: helm-kubectl link
This is the command I run my docker:
docker run -it -v ~/.kube:/root/.kube -v ~/.minikube:/Users/xxxx/.minikube dtzar/helm-kubectl
Inside the container, when I checked the cluster, I can see the context has loaded my minikube, However, I can't run another kubectl command due to the reason "The connection to the server 127.0.0.1:32768 was refused - did you specify the right host or port?".
bash-5.0# kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
docker-desktop docker-desktop docker-desktop
docker-for-desktop docker-desktop docker-desktop
* minikube minikube minikube
bash-5.0# kubectl get all
The connection to the server 127.0.0.1:32768 was refused - did you specify the right host or port?
I have checked my Kubenetes config at ~/.kube and the port is 32768.
- cluster:
certificate-authority: /Users/xxx/.minikube/ca.crt
server: https://127.0.0.1:32768
name: minikube
I have tried port -p 32768 or --expose 32768 but no luck. So anyone can help this?
Thanks zerkms! It works with --network host
I have got AWS EC2 instance started.
Logged onto the instance using Putty client.
Below all commands I tried on EC2 instance which is Ubuntu 18.04.
Configuration details of EC2 are as follows
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
I have installed docker and virtualbox
~$ docker --version
Docker version 19.03.8, build afacb8b7f0
$ dpkg -l | grep 'virtualbox'
ii virtualbox-5.2 5.2.30-130521~Ubuntu~bionic amd64 Oracle VM VirtualBox
$ lscpu | grep Virtualization
Virtualization type: full
I tried to start minikube.
$ minikube start
* minikube 1.9.2 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.9.2
* To disable this notice, run: 'minikube config set WantUpdateNotification false'
! minikube v1.9.0 on Ubuntu 18.04
* Using the virtualbox driver based on existing profile
* Creating virtualbox VM (CPUs=2, Memory=1993MB, Disk=20000MB) ...
! StartHost failed, but will try again: creating host: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
* Creating virtualbox VM (CPUs=2, Memory=1993MB, Disk=20000MB) ...
* StartHost failed again: creating host: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
- Run: "minikube delete", then "minikube start --alsologtostderr -v=1" to try again with more logging
*
E0408 16:46:12.812503 5285 style.go:173] unable to parse "X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible\n": template: X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible
:1: malformed character constant: 'minikube delete' - returning raw string.
X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible
* Error: [VBOX_VTX_DISABLED] creating host: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
* Suggestion: Virtualization support is disabled on your computer. If you are running minikube within a VM, try '--driver=none'. Otherwise, consult your systems BIOS manual for how to enable virtualization.
* Related issues:
- https://github.com/kubernetes/minikube/issues/3900
- https://github.com/kubernetes/minikube/issues/4730
Based on error message, I also tried below command:
$ minikube start --no-vtx-check
* minikube v1.9.0 on Ubuntu 18.04
* Automatically selected the virtualbox driver
* Creating virtualbox VM (CPUs=2, Memory=1993MB, Disk=20000MB) ...
! StartHost failed, but will try again: creating host: create: creating: Unable to start the VM: /usr/bin/VBoxManage startvm minikube --type headless failed:
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:00.455234 Power up failed (vrc=VERR_VMX_NO_VMX, rc=NS_ERROR_FAILURE (0X80004005))
* Deleting "minikube" in virtualbox ...
* Creating virtualbox VM (CPUs=2, Memory=1993MB, Disk=20000MB) ...
* StartHost failed again: creating host: create: creating: Unable to start the VM: /usr/bin/VBoxManage startvm minikube --type headless failed:
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:00.270050 Power up failed (vrc=VERR_VMX_NO_VMX, rc=NS_ERROR_FAILURE (0X80004005))
- Run: "minikube delete", then "minikube start --alsologtostderr -v=1" to try again with more logging
*
E0408 16:52:12.324862 5411 style.go:173] unable to parse "X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible\n": template: X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible
:1: malformed character constant: 'minikube delete' - returning raw string.
X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible
* Error: [VBOX_VERR_VMX_NO_VMX] creating host: create: creating: Unable to start the VM: /usr/bin/VBoxManage startvm minikube --type headless failed:
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:00.270050 Power up failed (vrc=VERR_VMX_NO_VMX, rc=NS_ERROR_FAILURE (0X80004005))
* Suggestion: Your host does not support virtualization. If you are running minikube within a VM, try '--driver=none'. Otherwise, enable virtualization in your BIOS
* Related issues:
- https://github.com/kubernetes/minikube/issues/1994
- https://github.com/kubernetes/minikube/issues/5326
I went to all those jira specified in error log but of no use. Most of those doesn't talk about issue within Amazon EC2 ubuntu 18.04 .
Questions:
how do I enable VT-X/AMD-v in BIOS in logged in EC2 instance which is ubuntu 18.04? Is there any command I can try? note: I don't have access to go to AWS EC2 instance GUI.
is AWS EC2 Ubuntu 18 instance compatible with virtualbox 5 or 6 to start minikube ?
Questions: how do I enable VT-X/AMD-v in BIOS in logged in EC2 instance which is ubuntu 18.04? Is there any command I can try? note: I don't have access to go to AWS EC2 instance GUI.
You don't, EC2 is a virtual server and You have no access to the BIOS.
To use Minikube on EC2 you need to start it without vm driver so just execute $ minikube start --vm-driver=none. This is described here if you insist on using Minikube.
Instead of installing Minikube I would recommend using kubeadm and setting single control-plane cluster with kubeadm.
I am trying to start minikube cluster on my macOS but i get always "Permission denied"
(base) MacBook-Pro-de-..:desktop ..$ minikube start
-bash: /usr/local/bin/minikube: Permission denied
What i should do ?
Execute following commands to add permissions to files:
$ chmod ugo+rwx ~/.kube/config
$ sudo chown -R $USER ~/.kube
$ chmod +x your-minikube-localization
Configure proxy:
export no_proxy=$no_proxy,$(minikube ip)
export NO_PROXY=$no_proxy,$(minikube ip)
Then run minikube command taking proxy under consideration (IPs set below are just example):
$ minikube start --alsologtostderr --kubernetes-version v1.13.1 --docker-env HTTP_PROXY=http://10.0.2.2:1087 --docker-env HTTPS_PROXY=http://10.0.2.2:1087 --docker-env NO_PROXY=10.0.2.2,192.168.99.100
$ minikube start --alsologtostderr --kubernetes-version v1.13.2 --docker-env HTTP_PROXY=http://10.0.2.2:3128 --docker-env HTTPS_PROXY=http://10.0.2.2:3128 --docker-env NO_PROXY=10.0.2.2,192.168.99.100
In this case proxy configuration:
HTTP_PROXY=http://127.0.0.1:3128
Please must remember to add your minikube IP to NO_PROXY.
Similar problems you can find here: file-permission, kubeconfig.
I got now this Error:
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
E0301 15:19:14.198136 48335 start.go:268] Error setting up kubeconfig: Error reading file "/../.kube/config": open /../.kube/config: not a directory
E0301 15:19:15.128758 48335 util.go:151] Error uploading error message: Error sending error report to https://clouderrorreporting.googleapis.com/v1beta1/projects/k8s-minikube/events:report?key=AIzaSyACUwzG0dEPcl-eOgpDKnyKoUFgHdfoFuA, got response code 400
GitHub issue link :
https://github.com/kubernetes/minikube/issues/1994
Docker on Windows installed already, docker is running fine and the containers are running fine.
Docker stopped and made running as well , for running K8s setup. Both scenarios, same status- minikube did not start.
I installed Google Cloud SDK and then started minikube/kubectl for setting K8S, FYI.
Hyper-V was running all along these setup, in my laptop.
Trying to run K8S locally on my laptop using {kubernetes.io/docs/getting-started-guides/minikube/} and observed the issues below.
Started kubectl cluster-info.
C:>kubectl cluster-info
Kubernetes master is running at https://192.168.99.100:8443
and then exited after sometime.
minikube version command was run.
Output is as follows :
C:>minikube-windows-amd64 version
minikube version: v0.21.0
minikube start command was run.
Output is as follows :
C:>minikube-windows-amd64 start
Starting local Kubernetes v1.7.0 cluster...
Starting VM...
E0921 18:52:12.921824 10592 start.go:129] Error starting host: Error starting stopped host: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm minikube --type headless failed:
VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:01.552591 Power up failed (vrc=VERR_VMX_NO_VMX, rc=E_FAIL (0X80004005)).
Retrying.
E0921 18:52:12.924743 10592 start.go:135] Error starting host: Error starting stopped host: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm minikube --type headless failed:
VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:01.552591 Power up failed (vrc=VERR_VMX_NO_VMX, rc=E_FAIL (0X80004005))
I then ran kubectl cluster-info dump. Output is as follows :
C:>kubectl cluster-info dump
Unable to connect to the server: dial tcp 192.168.99.100:8443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Then, I ran status of minikube. Output is as follows :
C:>minikube-windows-amd64 status
minikube: Saved
localkube:
kubectl:
Minikube on Windows uses VirtualBox per default and fails to create your virtual machine because Hyper-V disables VT-x access for other hypervisors. You need to either configure minikube to use Hyper-V or disable Hyper-V and run minikube start again.