No 'key' in 'toleration'. What does it mean?

Check static pod as ‘scheduler’ / ‘controller-manager’, there is no ‘key’ in ‘tolerations’, what does it mean? and how to evaluate toleration for it?

$ kubectl -n kube-system get pod kube-scheduler-ecs-matrix-k8s-cluster-1 -o json | jq ‘.spec.tolerations’
[
{
“effect”: “NoExecute”,
“operator”: “Exists”
}
]

$ kubectl -n kube-system get pod kube-controller-manager-ecs-matrix-k8s-cluster-1 -o json | jq ‘.spec.tolerations’
[
{
“effect”: “NoExecute”,
“operator”: “Exists”
}
]

Hi @Matrix-Zou

If key is not specified, then the toleration will match all taint keys and values.

From

kubectl explain pod.spec.tolerations

key (string)
Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.

1 Like

Thanks a lot @Alistair_KodeKloud