IL-0107 DFDS · 2022-08-03kubernetes
DFDS runs Kyverno, a policy engine for Kubernetes, with a ClusterPolicy whose admission webhook checks Service resources. Kyverno had not been kept up to date because of a code freeze. When a certificate chain expired in a third-party application, Kyverno got stuck in a crash loop. The ClusterPolicy's failurePolicy was left at the default, fail, so with the webhook unresponsive the Kubernetes API server rejected Service operations instead of letting them through, in every namespace that was not exempted. With failurePolicy set to ignore, the postmortem says, the issue would not have occurred.
The platform team started looking at the report at 11:50 UTC, identified the issue at 12:08 and reproduced it in a sandbox cluster at 12:18. The fix was to update Kyverno to a newer Helm chart version; it went into the sandbox first and reached the affected production cluster at 13:06. At 13:25 the user team confirmed that it worked. The postmortem gives 12 minutes to detection and 88 minutes to recovery.
The postmortem also lists that Kyverno went into production too early, without monitoring and without enough communication and coordination beforehand, that the problem had been raised but was not on the 'ops day to day' board, and that the team saw signs of Kyverno not being a mature project.
At 11:38 UTC on 3 August 2022 an end-user team told the platform team that applying a Service resource to one of the Kubernetes clusters failed.
Operations on Service resources (the postmortem calls them CRUD operations) failed in every namespace except the exempted ones, because the webhook that checks them did not respond. Kyverno, the policy engine that serves that webhook, was stuck in a crash loop.
Symptom ? Deploys failingContainer crash loop
Root cause ? Certificate or credential expiry
An end-user team alerted the platform team at 11:38 UTC that applying a Service resource failed; the platform team started looking into it at 11:50 UTC.
Operational issues should be added to the 'Ops Day to Day' board from the start.
–