Minikube dashboard and any other pods won't schedule

4/24/2018

After following the hello-minikube guide and installing minikube 0.26.1 the dashboard pod is not starting and also the hello-minikube pod is not getting started.

A kubectl describe pod xxx shows that the pod could not get scheduled.

Events:
 Type     Reason            Age                  From              Message
 ----     ------            ----                 ----               -------
 Warning  FailedScheduling  3m (x3368 over 16h)  default-scheduler  0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate.
-- mineralf
kubernetes
minikube

1 Answer

4/24/2018

This has to do with taints and tolerations in k8s versions starting from 1.6. By default the master node has a NoSchedule taint.

# kubectl describe node minikube
Name:               minikube
Roles:              master
[...]
Taints:             node-role.kubernetes.io/master:NoSchedule

You can add tolerations to the pods as described in this answer - but in my case I do not want to edit any pod specs as I want to test my deployments locally 1:1 as in a live k8s environment.

The other option is to delete the taint on the master node. See the documentation here and there.

kubectl taint nodes --all node-role.kubernetes.io/master-

In the specific case of a local minikube setup with only one node and testing deployments locally without adding tolerations this works as well:

kubectl taint nodes minikube node-role.kubernetes.io/master:NoSchedule-

This should be part of the minikube getting started guide imho.

-- mineralf
Source: StackOverflow