Warning FailedScheduling 12s (x3 over 13s) default-scheduler 0/1 nodes are available: 1 node(s) didn't match node selector

502 Views Asked by At

I'm stuck deploying the microservices locally with the following stack: Skaffold, minikube, helm, and harbor. These microservices can be deployed locally without any problem with docker and docker-compose. When I run skaffold dev, it stop at this point:

- statefulset/service0: Waiting for 1 pods to be ready...

When I describe the pod with the command: kubectl describe pod service-0

  Type     Reason            Age                From               Message
  ----     ------            ----               ----               -------
  Warning  FailedScheduling  12s (x3 over 13s)  default-scheduler  0/1 nodes are available: 1 node(s) didn't match node selector.

I don't know what I am doing wrong... Any ideas?

2

There are 2 best solutions below

0
On

https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/

Assign labels to a node to match your manifest or alter your manifest to match the nodeSelector statement in your YAML.

1
On

the problem was solved by running this command:

kubectl label node <node-name> role=server

in my case:

kubectl label nodes minikube role=server