k8wiz
Kyverno
Medium
Policies

A Kyverno DeletingPolicy deletes batch/v1 Jobs and leaves deletionPropagationPolicy unset. What happens to the Pods of each deleted Job?

Select your answer:

Show answer and explanation

Answer: They are orphaned and stay in the cluster

Explanation

With the field unset, Kyverno sends the delete without a propagation policy, so the API server applies the resource's default. For batch/v1 Jobs that default is to orphan dependents, kept for backward compatibility, so the Pods lose their owner and remain. kubectl delete hides this because it sends Background by default; set deletionPropagationPolicy to Background or Foreground in the policy.

Read more about Kyverno