我安装了kubernetes + minicube(MacOs 10.12.6)。但是在尝试启动微型计算机时,我会遇到不断的错误:
$: minikube start
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...
Starting cluster components...
E0601 15:24:50.571967 67567 start.go:281] Error restarting cluster: running cmd:
sudo kubeadm alpha phase certs all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase kubeconfig all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase controlplane all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase etcd local --config /var/lib/kubeadm.yaml
: Process exited with status 1
我还试图minikube delete
和minikube start
没有帮助(Minikube never start - Error restarting cluster)。此外kubectl config use-context minikube
已完成。
我有minikube版本:v0.26.1
我认为kubeadm.yaml文件丢失或放错地方。
答案 0 :(得分:1)
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.
In your issue, below steps should do the initialization process successfully:
minikube stop
minikube delete
rm -fr $HOME/.minikube
minikube start
In the case you mixed Kubernetes and minikube environments I suggest to inspect $HOME/.kube/config file and delete minikube entries to avoid problem with reinitialization.
If minikube still refuses to start please post logs to analyze. To get detailed log start minikube this way:
minikube start --v=9