Unable to start minikube in my Mac machine

7/17/2018

Unable to start minikube in my Mac machine. Information about the kubernetes, minikube versions as well as the error is given in detail below.

kubernetes-cli version
kubernetes-cli 1.11.0

minikube version
minikube version: v0.28.0

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...
E0717 16:19:06.522428   87230 start.go:299] 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
================================================================================
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]: 
y
-- Rpj
kubernetes
minikube

1 Answer

7/18/2018

Minikube should work "outside of the box" according to the documentation. Are you using VirtualBox or native hypervisor? There might be an issue with not enough resources so please check that. By default minikube uses 2 CPU's and 2048 megabytes of RAM as specified here. You can also influence minikube vm size using --cpu and/or --memory flags.

minikube start --cpus 4 --memory 8192

If resources are fine, try deleting the cluster and running minikube start again with verbose mode and post the results:

minikube delete
minikube start -v=2

From Debugging Issues with Minikube

To debug issues with minikube (not Kubernetes but minikube itself), you can use the -v flag to see debug level info. The specified values for v will do the following (the values are all encompassing in that higher values will give you all lower value outputs as well):

  • --v=0 INFO level logs
  • --v=1 WARNING level logs
  • --v=2 ERROR level logs
  • --v=3 libmachine logging
  • --v=7 libmachine --debug level logging
-- aurelius
Source: StackOverflow