minikube: docker inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube: exit status 1
Steps to reproduce the issue:
Full output of failed command:
Full output of minikube start command used, if not already included:
Optional: Full output of minikube logs command:
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 22 (8 by maintainers)
Was facing the same issue after a fresh minikube install. Only a
minikube deletedid not solve for me as @j75, I did adocker system prune,minikube deleteand thenminikube start --driver=dockerand it worked fine.I performed a cleanup using “minikube delete” and then started using “minikube start --driver=docker” it worked
In my case, removing minikube container
docker rm minikubeandminikube startsolved the problem.I was able to start the cluster without tearing it down.
These are the steps that I followed:
minikubefrom source in order to use the new--networkflag. This flag is not available in the latest release, and it’s needed. Otherwise,minikube startwill attempt to create a network and it will fail with the errors above.I beleive this happens when minikube tried to create a container, but then docker failed but on a second start there is stuck container, that minikube can not create on top of it.
currently if users specify “–delete-on-failure” as this PR https://github.com/kubernetes/minikube/pull/8628 it will fix the problem.
however we could detect that this is not a recover-able state and we should just delete it for them. even if they don’t specify this flag. this would require some extra care or maybe a prompt from the user. to confirm the delete (if they dont have a any interesting data inside the dead container)
The current work-around:
restart docker and ensure it is running minikube delete minikube start