Ajouve
Ajouve

Reputation: 10079

4 node(s) didn't match node selector k8s metrics-server

I just installed metrics-server on my kubernetes cluster running

$ kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml

But the pod do not boot and I have the following error

0/4 nodes are available: 4 node(s) didn't match node selector.

Upvotes: 0

Views: 6260

Answers (1)

Arghya Sadhu
Arghya Sadhu

Reputation: 44549

Metrics server have below nodeSelector in the deployment yaml

  nodeSelector:
    kubernetes.io/os: linux
    kubernetes.io/arch: "amd64"

This error means that there is no node with label kubernetes.io/os: linux and kubernetes.io/arch: "amd64"

You can either remove the nodeSelector from the deployment yaml before deploying it or you can add those labels into your nodes.

kubectl label nodes <your-node-name> kubernetes.io/os=linux
kubectl label nodes <your-node-name> kubernetes.io/arch=amd64

Upvotes: 4

Related Questions