instalar como ubuntu kubernetes minikube

ubuntu - como - kubectl



Minikube se instala en Ubuntu vm_VT-X/AMD-v habilitando a VM dentro de otra VM (6)

Estoy intentando instalar minikube en Ubuntu vm (en el cuadro virtual). He habilitado VT-X / AMD-v para el vm. Pero estoy recibiendo el siguiente error.

# minikube start Starting local Kubernetes cluster... E0217 15:00:35.395801 3869 start.go:107] Error starting host: Error creating host: Error with pre-create check: "This computer doesn''t have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory". Retrying. E0217 15:00:35.396019 3869 start.go:113] Error starting host: Error creating host: Error with pre-create check: "This computer doesn''t have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory" ================================================================================ An error has occurred. Would you like to opt in to sending anonymized crash information to minikube to help prevent future errors? To opt out of these messages, run the command: minikube config set WantReportErrorPrompt false ================================================================================ Please enter your response [Y/n]:

Encontré una reference , de acuerdo con eso, no podemos tener virtualización dentro de la virtualización. ¿Es verdad? ¿Cómo puedo arreglar esto?


"Instale Minikube en el sistema operativo host y no en una máquina virtual".

no es del todo correcto, de hecho, puede instalar minikube en la máquina virtual de Linux sobre virtualbox o vmware, etc, con la opción de controlador none, que utiliza localkube directamente con kubernetes en la ventana acoplable del host de VM.

Puede hacer este pequeño script en Linux VM para iniciar minikube en pocos minutos.

https://github.com/robertluwang/docker-hands-on-guide/blob/master/minikube-none-installation.md


Compruebe si está correctamente habilitado para la máquina virtual (ejecutar dentro de la máquina virtual):

egrep -i ''^flags.*(svm|vmx)'' /proc/cpuinfo

Y en el núcleo de VM:

dmesg | egrep ''DMAR|IOMMU''

VirtualBox solo funciona con un invitado anidado de 32 bits, así que también marque (no es compatible con invitados anidados, pero funciona con 32 bits):

uname -m


Ejecute Minikube directamente en la máquina virtual utilizando Docker y la opción de controlador "ninguna" que no requiere virtualización anidada.

Establecer la opción de ninguno de controlador:

[root@minikube ~]# minikube config set vm-driver none

Instale Docker-ce siguiendo las instrucciones para la versión de sistema operativo de su VM.

Por último ejecutar el inicio de minikube:

[root@minikube ~]# systemctl enable docker Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. [root@minikube ~]# systemctl start docker [root@minikube ~]# minikube start Starting local Kubernetes v1.10.0 cluster... Starting VM... Getting VM IP address... Moving files into cluster... Downloading kubeadm v1.10.0 Downloading kubelet v1.10.0 Finished Downloading kubelet v1.10.0 Finished Downloading kubeadm v1.10.0 Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster. =================== WARNING: IT IS RECOMMENDED NOT TO RUN THE NONE DRIVER ON PERSONAL WORKSTATIONS The ''none'' driver will run an insecure kubernetes apiserver as root that may leave the host vulnerable to CSRF attacks When using the none driver, the kubectl config and credentials generated will be root owned and will appear in the root home directory. You will need to move the files to the appropriate location and then set the correct permissions. An example of this is below: sudo mv /root/.kube $HOME/.kube # this will write over any previous configuration sudo chown -R $USER $HOME/.kube sudo chgrp -R $USER $HOME/.kube sudo mv /root/.minikube $HOME/.minikube # this will write over any previous configuration sudo chown -R $USER $HOME/.minikube sudo chgrp -R $USER $HOME/.minikube This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true Loading cached images from config file.


Instalé VM ware e instalé Virtualbox dentro de la VM. Y habilitó VT-X / AMD-v en VM externa. funciona bien


Intente ejecutar minikube sin virtualización anidada (la ventana acoplable debería estar instalada):

minikube start --vm-driver=none

De la documentation Kubernetes:

Minikube también admite una opción --vm-driver = none que ejecuta los componentes Kubernetes en el host y no en una máquina virtual. El uso de este controlador requiere Docker y un entorno de Linux, pero no un hipervisor.


Virtual Box no admite VT-X / AMD-v en la virtualización anidada . Vea esta solicitud de entrada / función abierta en virtualbox.org.

También hay algunas preguntas y respuestas más aquí sobre el topic SO que trata this topic .

Soluciones posibles:

  1. Como ya se mencionó: use un hipervisor diferente que sea compatible con VT-X / AMD-v en la virtualización anidada (como Xen, KVM o VMware).
  2. Instale Minikube en el sistema operativo host y no en una máquina virtual.