djkobi97
djkobi97

Reputation: 77

Kubernetes livenessProbe/readinessProbe deploy problem

I tried to apply my pod with livenessProbe and readinessProbe. The problem is that i get a error: after apply: kubectl apply -f test1.yaml

Error:

The Pod "test1" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)....

Upvotes: 0

Views: 239

Answers (1)

EnzoAT_
EnzoAT_

Reputation: 391

Check if you have a pod named test1 already running, when you apply your yaml, Kubernetes think you want to modify the pod already running, and this action only permits changes to specific fields like the message indicates. To check if there is a pod running check with this command.

kubectl get pod test1 

then delete the pod and apply your yaml.

kubectl delete pod test1

kubectl apply -f xxxx

Upvotes: 2

Related Questions