Kubectl apply -f 4.yml error as below:- The Pod “alpha” is invalid: spec.tolera . . .

Ankit Singh:
kubectl apply -f 4.yml error as below:-
The Pod “alpha” is invalid: spec.tolerations[2].operator: Invalid value: core.Toleration{Key:“app_type”, Operator:“Exists”, Value:“alpha”, Effect:“NoSchedule”, TolerationSeconds:(*int64)(nil)}: value must be empty when operator is ‘Exists’

Marko Eremija:
you can check that by using the kubectl explain command, in this case kubectl explain pod.spec.tolerations

Marko Eremija:
at the bottom is the explanation for the value field:

   value	<string>
     Value is the taint value the toleration matches to. If the operator is
     Exists, the value should be empty, otherwise just a regular string.

Marko Eremija:
and also for operator Exists:

Exists is equivalent to wildcard for
     value, so that a pod can tolerate all taints of a particular category.

unnivkn:
Hi @Ankit Singh please have a look on this: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#concepts

Alistair Mackay:
Basically, with operator: Exists you do not put value: