Lak*_*age 22 ubuntu kubernetes minikube
我想在Ubuntu vm中安装minikube(在虚拟框中).我为vm启用了VT-X/AMD-v.但是我得到了以下错误.
# 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]:
Run Code Online (Sandbox Code Playgroud)
我找到了一个参考,据我所知,我们不能在虚拟化中进行虚拟化.这是真的吗?我怎样才能解决这个问题?
小智 23
使用Docker直接在VM上运行Minikube,并且不需要嵌套虚拟化的"none"驱动程序选项.
设置none驱动程序选项:
[root@minikube ~]# minikube config set vm-driver none
Run Code Online (Sandbox Code Playgroud)
按照VM OS版本的说明安装Docker-ce.
最后运行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.
Run Code Online (Sandbox Code Playgroud)
尝试在没有嵌套虚拟化的情况下运行minikube(应安装docker):
minikube start --vm-driver=none
Run Code Online (Sandbox Code Playgroud)
从Kubernetes 文档中:
Minikube还支持--vm-driver = none选项,该选项在主机而不是VM中运行Kubernetes组件。使用此驱动程序需要Docker和linux环境,但不需要管理程序。
归档时间: |
|
查看次数: |
18705 次 |
最近记录: |