I'm running minikube with the vbox driver. I noticed that when I get back to my workstation after it's been in sleep mode, I can't do kubectl get pods
(or any other kubectl
command).
Some digging and I found that the the HostOnly network adapter of the minikube machine is not working. I logged in to the machine with minikube ssh
and tried to restart the interface but I'm just getting an error.
$ ifdown eth1
ifdown: can't open '/etc/network/interfaces': No such file or directory
the only thing currently working is to minikube stop
and minikube start
again. But that takes long and I just want to get back to work.
any ideas on how to fix the network quicker after it's been in sleep mode? or prevent it losing the network altogether?
minikube start
should resume the cluster after being stopped/paused.However, there is an issue with Minikube on VirtualBox and HostOnly network adapter that sometimes causes the adapter to stop working. When that happens you can do two things:
Execute
minikube stop
andminikube start
as you already tried which is a common workaround solution for this.Uninstall the VirtualBox and reinstall at least version 5.0.12 that is supposed to fix this issue.
This bug is being discussed here and here if you'd like to know more details.