minikube: minikube start hung: etcd CrashLoopBackoff

BUG REPORT

Environment:

Minikube version v0.26.1

  • OS MacOS High Sierra 10.13.4

  • VM Driver Virtual Box

  • ISO version Latest as of today

  • Install tools:

  • Others:

What happened:

Initial minikube start hangs at ‘Starting cluster components…’ and never completes. Note that the vm ‘is’ running, and I can log into it from the Virtual Box console. From another terminal window, ‘minikube ip’ does return an ip address.

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

What you expected to happen:

Ummm - for it to complete, of course…

How to reproduce it (as minimally and precisely as possible):

minikube start

Output of minikube logs (if applicable):

(attached) minikube-logs-output.txt

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 30
  • Comments: 65 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Temporary workaround:

Using these instructions as an example, I forced an install of 0.25.2 in the meantime:

minikube stop
minikube delete
brew cask uninstall --force minikube
brew cask edit minikube
#See below for file
brew cask install minikube

Using this file:

cask 'minikube' do
  version '0.25.2'
  sha256 'dc5b00c4a06e8160bd607732c9a2294598d803716e353293b4463cc2c9539eec'

  # storage.googleapis.com/minikube was verified as official when first introduced to the cask
  url "https://storage.googleapis.com/minikube/releases/v#{version}/minikube-darwin-amd64"
  appcast 'https://github.com/kubernetes/minikube/releases.atom',
          checkpoint: 'dc5b00c4a06e8160bd607732c9a2294598d803716e353293b4463cc2c9539eec'
  name 'Minikube'
  homepage 'https://github.com/kubernetes/minikube'

  depends_on formula: 'kubernetes-cli'
  container type: :naked

  binary 'minikube-darwin-amd64', target: 'minikube'

  zap trash: '~/.minikube'
end

same issue here

Also try minikube delete && rm -rf ~/.minikube

But it not worked

Use minikube logs -f and see the error is:

Apr 24 15:44:59 minikube kubelet[3287]: E0424 15:44:59.532988 3287 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:451: Failed to list *v1.Service: Get https://192.168.99.100:8443/api/v1/services?limit=500&resourceVersion=0: dial tcp 192.168.99.100:8443: getsockopt: connection refused Apr 24 15:44:59 minikube kubelet[3287]: E0424 15:44:59.533844 3287 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:47: Failed to list *v1.Pod: Get https://192.168.99.100:8443/api/v1/pods?fieldSelector=spec.nodeName%3Dminikube&limit=500&resourceVersion=0: dial tcp 192.168.99.100:8443: getsockopt: connection refused

try to run minikube start --bootstrapper=localkube , it works well…

➜  ~ minikube start --bootstrapper=localkube
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
WARNING: The localkube bootstrapper is now deprecated and support for it
will be removed in a future release. Please consider switching to the kubeadm bootstrapper, which
is intended to replace the localkube bootstrapper. To disable this message, run
[minikube config set ShowBootstrapperDeprecationNotification false]
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

If you have an old ~/.minikube, try

$ minikube delete
$ rm -rf ~/.minikube

Try starting up again.

This workaround worked:

minikube start --bootstrapper=localkube

Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
WARNING: The localkube bootstrapper is now deprecated and support for it
will be removed in a future release. Please consider switching to the kubeadm bootstrapper, which
is intended to replace the localkube bootstrapper. To disable this message, run
[minikube config set ShowBootstrapperDeprecationNotification false]
Moving files into cluster...
Downloading localkube binary
 173.54 MB / 173.54 MB [============================================] 100.00% 0s
 0 B / 65 B [----------------------------------------------------------]   0.00%
 65 B / 65 B [======================================================] 100.00% 0sSetting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

Similar problem on minikube for windows. I did a minikube delete && rm ~/.minikube and reinstalled v0.25.2 and minikube started in <30 seconds.

I too am encountering the same set of problems :-

Configuration

  • Minikube: Both 0.26.1 as well as 0.27
  • OS: osx 10.13.4

Issues:

See attempts below that did not work :-

minikube start --vm-driver=hyperkit --bootstrapper=localkube

$> kubectl get all --all-namespaces
NAMESPACE     NAME                              READY     STATUS              RESTARTS   AGE
kube-system   pod/kube-addon-manager-minikube   0/1       ContainerCreating   0          8m

NAMESPACE   NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
default     service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   8m

minikube start

May 19 19:57:08 minikube kubelet[2986]: E0519 19:57:08.559046    2986 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:451: Failed to list *v1.Service: Get https://192.168.64.5:8443/api/v1/services?limit=500&resourceVersion=0: dial tcp 192.168.64.5:8443: getsockopt: connection refused
May 19 19:57:09 minikube kubelet[2986]: E0519 19:57:09.561264    2986 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:47: Failed to list *v1.Pod: Get https://192.168.64.5:8443/api/v1/pods?fieldSelector=spec.nodeName%3Dminikube&limit=500&resourceVersion=0: dial tcp 192.168.64.5:8443: getsockopt: connection refused
May 19 19:57:09 minikube kubelet[2986]: E0519 19:57:09.561264    2986 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:460: Failed to list *v1.Node: Get https://192.168.64.5:8443/api/v1/nodes?fieldSelector=metadata.name%3Dminikube&limit=500&resourceVersion=0: dial tcp 192.168.64.5:8443: getsockopt: connection refused
May 19 19:57:09 minikube kubelet[2986]: E0519 19:57:09.561585    2986 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:451: Failed to list *v1.Service: Get https://192.168.64.5:8443/api/v1/services?limit=500&resourceVersion=0: dial tcp 192.168.64.5:8443: getsockopt: connection refused
May 19 19:57:09 minikube kubelet[2986]: E0519 19:57:09.736862    2986 eviction_manager.go:246] eviction manager: failed to get get summary stats: failed to get node info: node "minikube" not found

Thanks @ChinaSilence minikube start --bootstrapper=localkube helps me start cluster components!

$ kubectl cluster-info

Kubernetes master is running at https://192.168.99.100:8443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

update - the ‘–extra-config’ that gsaslis mentioned above did ‘not’ work for me. Total hang to the point where the computer almost totally locked up and I had to reset it.

Downgrading minikube to 0.25.2 ‘did’ work just fine, so the problem appears to be something in the 0.26.x codebase.

just to share that on minikube version: v0.26.1, --extra-config=apiserver.service-node-port-range=90-32000 worked for me.

p.s. the minikube logs -f helped me identify what the problem was.

@slmagus v0.25.2 is running well as expected. But seems there is an issue #2753 with 0.26.0 and 0.26.1. Since last 10 days, I’m facing issue, before that 0.26.* were working.

+1

Update: @ttripp workaround worked for me !!!, the --bootstrapper=localkube didn’t worked because minikube status gave me cluster: stoped …

for now @ttripp thank you man !

You can work around this by using the localkube bootstrapper.

I hope a fix for this is forthcoming soon.