EmergencyE5
Kyverno refuses new pods
- When
- New pods on prd are not created: rollouts stall, Jobs start nothing, and the FailedCreate events name the webhook mpol.validate.kyverno.svc-fail.
Kyverno's admission controller (kyverno-prd, three replicas) sets each new pod's memory request
on prd. Its pod webhook fails closed, so while no replica answers, every pod create in a covered
namespace is refused. Running pods are untouched. The break-glass scales Kyverno to zero and
deletes its webhook registrations: pods are then created without Kyverno until it is scaled back up
and registers again.
The commands are the Ansible Kyverno runbook's Break-glass, mirrored on this site. This card is the order, and what to have on the desk.
Identify #
| You see | Do |
|---|---|
failed calling webhook "mpol.validate.kyverno.svc-fail" in a ReplicaSet's, Job's or StatefulSet's FailedCreate events |
Kyverno isn't answering. Restore below |
admission webhook "mpol.validate.kyverno.svc-fail" denied the request |
Kyverno answers with an error from its policy. Restore below brings pod creation back too; the fix is in its policy in PlatformAddOnsDeploy kyverno/ |
Pods missing in kube-system, metallb-system, argocd-prd, argocd-hooks or kyverno-prd, or a KubeCoder environment pod |
Not this card: the webhook never sees those pods |
| A pod started with a memory request you didn't expect | Not this card: Which request a pod got |
Before you start #
- Write access
~/.kube/config-prd-write. The default kubeconfig can't scale Kyverno or delete its webhook registrations. - API token or apiserver VIP broken
ssh ansible@srvk8s1 sudo microk8s kubectl …on a control-plane node, by IP if DNS is down too (cold-boot.md § Break-glass, "SSH by IP"). - The probethe runbook's server-side dry run of a pod in
development. It printspod/kyverno-probewhen admitted and the webhook's error when refused, and creates nothing.
Restore #
- Proberefused, naming
mpol.validate.kyverno.svc-fail. - Scale to 0
kyverno-admission-controllerinkyverno-prd, every time, and wait for its pods to go. A replica that runs, even one crash-looping, writes the registrations back. - Delete the registrationsevery mutating and validating webhook registration labelled
webhook.kyverno.io/managed-by=kyverno. Note the UTC time. - Probeadmitted.
Afterwards #
- Fix Kyvernowith its registrations gone nothing of Kyverno's refuses an apply, so a fix
pushed to PlatformAddOnsDeploy
kyverno/syncs as usual. - Scale back to 3
kyverno-admission-controller. Kyverno doesn't come back by itself: withselfHealoff, Argo leaves it at 0 until then or untilkyverno-prdsyncs from PlatformAddOnsDeploykyverno/. - Registrations backonce a replica leads,
kyverno-resource-mutating-webhook-cfgwith entrympol.validate.kyverno.svc-failand ownerkyverno-prd:webhook. The probe is admitted. - Pods created since the noted timethey kept the request they arrived with, none or their
limit. List them and
kubectl rollout restartthe workloads that should not wait for their next pod.
The runbook's Drilling it rehearses this card with Kyverno healthy.
End of procedure