skip to content
Julian Louis

Selectra · Head of Infrastructure · Oct 2024 – present

Policy as code with Kyverno

We have several teams shipping to the same Kubernetes clusters. Everyone mostly agreed on how things should be configured, but "mostly" was doing a lot of work: missing resource limits, containers running as root, labels that depended on who wrote the manifest.

Reminding people in pull request reviews didn't scale, so I put the rules in the cluster instead. I installed Kyverno and wrote policies for the things we kept repeating in reviews: security settings, compliance requirements, and the configuration conventions we expect on every workload.

Kyverno policies are just Kubernetes resources, so they live in Git and get deployed like everything else. Same rules on every cluster, and a change to a rule goes through review like any other change.

The main win is that nobody has to remember the standards anymore. If a manifest doesn't follow them, Kyverno says so right away, and the review can focus on what the change actually does.

← Back to selected work