Lucian Negru
Lucian Negru

Reputation: 1

Prevent pod deletion in kubernetes but allow scaling

Is it possible to create a policy (kyverno?) where I would like to prevent deletion of pods with kubectl but allow the deployment/statefullset to be scaled down or up? I read somewhere, that a posibility would be to create a kyverno policy that would allow scaling down or up. But my question is, would that implicitly deny manual deletion?

I haven't tested this, but I will. Just wanted to know if there's a better way of doing this.

Thanks!

Upvotes: 0

Views: 173

Answers (0)

Related Questions