Kyverno's disallow-latest-tag policy can silently block pod recovery after eviction
A Kyverno ClusterPolicy enforcing disallow-latest-tag only triggers on Kubernetes admission events — specifically Pod CREATE or UPDATE — meaning existing pods using the ':latest' image tag continue running unaffected after the policy is applied. The hidden danger emerges when those pods need to be recreated, such as after a node memory eviction, drain, or rollout restart, at which point the webhook blocks the new pod and the workload never recovers. In-place container restarts by the kubelet do not create new Pod objects, so CrashLoopBackOff pods with ':latest' can loop indefinitely without ever tripping the policy. This creates two silent populations in a cluster: compliant workloads and legacy workloads that only survive until their Pod object is replaced. Engineers should also note that Kyverno 1.13 moved enforcement configuration from spec.validationFailureAction to a per-rule validate.failureAction, meaning older copied policies may not enforce as expected on newer installs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in