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

4/10/2020

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.
-- Ajouve
kubernetes
metrics-server

1 Answer

4/10/2020

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
-- Arghya Sadhu
Source: StackOverflow