Kubectl with minikube - Error restarting cluster: kubeadm.yaml

6/1/2018

I have kubernetes + minicube installed (MacOs 10.12.6) installed. But while trying to start the minicube i get constant errors:

$: 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

I've also tried to do minikube delete and the minikube start that didn't help (Minikube never start - Error restarting cluster). Also kubectl config use-context minikube was done.

I have minikube version: v0.26.1

It looks to me that kubeadm.yaml file is missing or misplaced.

-- shershen
kubernetes
minikube

1 Answer

6/4/2018

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
-- d0bry
Source: StackOverflow