21 from Completed Is Not Restored: Kyverno Fail-Open, a Velero Restore and an HTTP 200 That Meant 500
The effect check: a control counts once a test has read its outcome, not its status
By Vladimir Mikhalev Docker Captain · CNCF Ambassador · IBM Champion
Blueprint 21 A status is a component's account of the task it was given, and each task here was narrower than the outcome. Kyverno shut down cleanly, Velero copied every volume it supports, and the demo answered. Admission was open, the disk was empty and the request had failed.
The procedure replaces three status reads with three reads of the outcome, run where a failure costs nothing: a cluster made for the test and gone after it.
- 1
List what only a webhook enforces
Compare the policies the API server enforces itself with every Kyverno
ValidatingPolicy:kubectl get validatingadmissionpoliciesagainstkubectl get validatingpolicies.policies.kyverno.io, both sorted, thencomm -13. What is left stops the moment Kyverno's admission controller is scaled to zero, because Kyverno deletes the webhook configurations it registered on the way down. Owner: the platform engineer who owns admission policy. - 2
Move every rule the API server can run into the API server
Set
autogen.validatingAdmissionPolicy.enabled: trueon each one, so Kyverno compiles it into a ValidatingAdmissionPolicy that the API server evaluates in-process. Kyverno's documentation makes that and pod controller auto-generation mutually exclusive, so one CEL variable reads the pod spec of a Pod, a CronJob and every controller that makes Pods. SetfailurePolicy: Failon purpose: since Kyverno 1.20 a policy that saysIgnorealso admits a request when its own evaluation fails. Write down why each rule that stays cannot move: mutation and generation still need Kyverno. - 3
Make the checker's absence a refusal
Image verification cannot move: the API server has no way to check a signature. For a check like that, add a native policy whose parameter is Kyverno's own webhook configuration, with
parameterNotFoundAction: Deny, so a pod that mounts a model is admitted only while Kyverno's webhook for that check exists and fails closed. With Kyverno gone, no new model starts and the one already served keeps answering. That is an outage, not a hole. - 4
Drill admission with the controller at zero, more than once
In a cluster made for the test, turn off Argo CD's auto-sync for Kyverno, scale
kyverno-admission-controllerto zero, wait for its pods to go, and send every planted violation withkubectl apply --dry-run=server. Each must be refused by the rule its plant names, and a compliant pod in the same set must be admitted, so the refusals are not the cluster refusing everything. Then turn auto-sync back on and require Argo CD to bring the controller back. A drill that passed once proves nothing about the next: on 21 October one game day kept all seven of Kyverno's webhook configurations, and the next lost five. - 5
Give each backed-up volume a type the backup can copy
Velero's file-system backup does not support hostPath volumes, and it skips them without failing the backup. The local-path provisioner behind kind's default class makes hostPath unless the class or the claim asks for
local. For every StorageClass a backed-up namespace uses, read the type withkubectl get storageclass -o custom-columns=NAME:.metadata.name,PROVISIONER:.provisioner,TYPE:.metadata.annotations.defaultVolumeType, and give the classdefaultVolumeType: localwhere it is missing. Owner: whoever owns the backup schedule, usually the SRE on the platform team. - 6
Count what each backup copied, and read the data back
Velero writes one PodVolumeBackup for each volume it copied:
kubectl -n velero get podvolumebackups -l velero.io/backup-name=<backup>. Zero means no volume was copied, whatever the backup's phase says. Then write a marker through the front door, delete the namespace, restore, and read the marker back. It is the restore proof one level down: a backup counts once its data has come back. - 7
Read the error where the application writes it
A check on a status code reads what the application chose to send. podinfo, the platform's demo, writes every handler error with HTTP 200 and the code in the body,
{"code": 500, "message": "reading file failed"}, and a file it can read comes back with 202, so a check that expected 500 could never pass. Read the body where the application puts its errors, and make a real service return the status it means: an objective that counts 5xx responses counts that failure as a success. - 8
Put the reads on a schedule, and name the step that broke
A scheduled job creates a kind cluster on a runner that is thrown away after it, bootstraps Argo CD at the commit under test, waits for every Application to be Synced and Healthy, and runs every read above. The run's summary names the failing step, so the on-call engineer knows which promise broke without reading the log. Owner: the platform team.
Three statuses, and the read that replaced each
| Component | What its status said | What the check reads instead |
|---|---|---|
| Kyverno, admission controller scaled to zero | No error; its webhook configurations deleted | Every planted violation refused, and a compliant pod admitted, while the controller is at zero |
| Velero, backup and restore on kind's default class | Completed, then Completed | One PodVolumeBackup per volume, and a marker read back after the restore |
| podinfo, a file it cannot read | HTTP 200 | The body: code 500, reading file failed |
What shows it works
The runs and releases behind each step.
- The scheduled kind run of 23 November 2026, on Kyverno 1.20.0: four policies compiled into ValidatingAdmissionPolicies, Kyverno removes its resource webhook when it stops, five planted violations are refused anyway (four by the generated policies, one by Pod Security), the compliant pod is admitted, and Argo CD brings the controller back from zero. In the same job a backup holds one pod volume, the namespace and its volume are deleted, and the marker is served again after the restore.
- The hands-on guide run of 12 October 2026: the backup that copies no volume finishes Completed, the PodVolumeBackups read 1 against 0, the restore from it says Completed, and the check that expected HTTP 500 got 200. The run after the fix, the same day: the check reads the body, and the backend says 500, reading file failed.
- Two game days of 21 October 2026 on the air-gapped agent, on Kyverno 1.19.1: in the first the webhook configurations stay at seven after the controller stops; in the second seven become two, and a model nobody signed and one under a licence the site does not allow are admitted.
- The game day with the guard, the same day, and release v1.6.0, which ships it: with Kyverno at zero all three models are refused, the signed one included, the model already served keeps answering, and the signed model is admitted again 31 seconds after Kyverno is scaled up.
- aws-eks-reference-platform v1.2.0: the release the post quotes, with the policy, the
kind-localStorageClass, the drill and the scheduled workflow.
A status reports the component's work; only a read of the outcome reports the control.
The long version is the post Completed Is Not Restored. Kyverno, issue 6554, the webhook server at 1.20.0 and ValidatingPolicy; Kubernetes, Validating Admission Policy; Velero, File System Backup; Rancher, local-path-provisioner; podinfo, the HTTP error response at 6.15.0; all checked November 2026.