Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minikube never start - Error restarting cluster

I'm using Arch linux
I had virtualbox 5.2.12 installed
I had the minikube 0.27.0-1 installed
I had the Kubernetes v1.10.0 installed

When i try start the minkube with sudo minikube start i get 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...
Starting cluster components...
E0527 12:58:18.929483   22672 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
: running command: 
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
: exit status 1

I already try start minekube with others option like:

sudo minikube start --kubernetes-version v1.10.0 --bootstrapper kubeadm

sudo minikube start --bootstrapper kubeadm

sudo minikube start --vm-driver none

sudo minikube start --vm-driver virtualbox

sudo minikube start --vm-driver kvm

sudo minikube start --vm-driver kvm2

Always I get the same error. Can someone help me?

like image 593
Italo José Avatar asked May 27 '18 16:05

Italo José


People also ask

How do I restart a minikube cluster?

If you want to wipe out your local Minikube cluster and restart, it is very easy to do so. Issuing a command to delete and then start Minikube will wipe out the environment and reset it to a blank slate: minikube deleteDeleting local Kubernetes cluster... Machine deleted.

How much memory does minikube need?

Setup. This reserves 6 GB of RAM for Minikube and starts it up. If you're low on RAM and only intend to run the databases on Minikube, you can likely get away with a smaller number, like 2048.

What is the difference between minikube and MicroK8s?

Minikube is the easiest overall to use, but it's not a production-grade solution. K3s is the easier production-grade lightweight distribution. MicroK8s provides the greatest degree of control, but it's a bit harder to install and configure than the other distributions.

How do you purge minikube?

Options. --all Set flag to delete all profiles -o, --output string Format to print stdout in. Options include: [text,json] (default "text") --purge Set this flag to delete the '. minikube' folder from your user directory.


1 Answers

Minikube VM is usually started for simple experiments without any important payload. That's why it's much easier to recreate minikube cluster than trying to fix it.

To delete existing minikube VM execute the following command:

minikube delete

This command shuts down and deletes the minikube virtual machine. No data or state is preserved.

Check if you have all dependencies at place and run command:

minikube start

This command creates a “kubectl context” called “minikube”. This context contains the configuration to communicate with your minikube cluster. minikube sets this context to default automatically, but if you need to switch back to it in the future, run:

kubectl config use-context minikube

Or pass the context on each command like this:

kubectl get pods --context=minikube

More information about command line arguments can be found here.

like image 85
VASャ Avatar answered Sep 23 '22 14:09

VASャ