Cases2 cases
1 to 2 of 2
IL-0008An unresponsive OPA validating webhook crash-looped the API server during a GKE master upgrade, and node auto-repair then recreated every nodeJetstack2019- Symptoms
Jetstack was upgrading the master of a development cluster that many teams use to test their apps during the working day, a regional Google Kubernetes Engine (GKE) cluster in europe-west1. The upgrade ran through Jetstack's GKE Terraform pipeline and did not finish before the 20-minute Terraform timeout, while the GKE console still showed the cluster as upgrading.
- Trigger
A planned master upgrade of the shared development cluster. The same upgrade had been done on another pre-production environment earlier that day, and no API downtime was expected.
- Root cause
- Component
- Contributing factor
- Detection
The first sign was the master upgrade missing the 20-minute Terraform timeout; re-running the pipeline returned the kube-apiserver unhealthy error. The cause was identified with the help of Google Support.
- Remediation
- Deleted the OPA ValidatingAdmissionWebhook resource during a window of API server access
- Action items
- Limit the OPA webhook to the namespaces where the policy applies and development teams have access
- Enable the webhook only for Ingress and Service resources, the only resources the policy validates
- Add a liveness probe so OPA is restarted when it stops responding, and update the OPA documentation
- Follow the open upstream Kubernetes issue about this behaviour
- Lessons
With alerting on API server response times, the team might have seen CREATE and UPDATE requests slow down across the board as soon as the OPA-backed webhook was first deployed. Every workload needs probes: OPA looked so simple to deploy that the team skipped the Helm chart, which adds a livenessProbe for the admission controller containers among other adjustments to the tutorial configuration. Others had hit the same problem, and an upstream issue to improve it was still open.
IL-0014A GKE upgrade to a withdrawn version stalled on slow drains and a stuck node pool, then broke an ingress and confused the HPAloveholidays2019- Symptoms
On the evening of a long-overdue upgrade of a loveholidays production GKE cluster from 1.10.X to 1.12.5-gke.10, planned to take 2 to 2.5 hours, the master upgrade and the first two 7-node NodePools went smoothly. After that the NodePool upgrades slowed to a crawl. Each node is cordoned, drained and upgraded in turn. Even a 14-node cluster at about 5 minutes per node took over an hour, and with about 100 more nodes to go, some of them taking over 15 minutes to drain, the sequential drains were too slow to finish at a reasonable hour.
- Trigger
A manual upgrade of the GKE masters and NodePools from 1.10.X to 1.12.5-gke.10, two versions at once, on 19 March 2019; GKE's release notes of 14 March had already said that version was no longer available for new clusters or master upgrades because masters showed elevated error rates, but it could still be selected.
- Root cause
- Component
- Contributing factor
- Detection
The slow drains, zombie nodes and stuck NodePool were seen by the engineer running the upgrade; the broken Ingress was noticed after the upgrade and explained by Google support; the HPA problem was noticed the next day.
- Remediation
- drained the remaining NodePool nodes ahead of the upgrade with kubectl drain --ignore-daemonsets --delete-local-data
- deleted the zombie instances from the managed instance group with gcloud compute instance-groups managed delete-instances
- cancelled the stuck UPGRADE_NODES operation with gcloud beta container operations cancel
- used kubectl port-forward in place of the broken internal Ingresses
- scaled down the older of two active ReplicaSets, or triggered a dummy deployment, to bring the HPA back
- Action items
- Alert when a HorizontalPodAutoscaler is at 70% and at 100% of its capacity
- Alert when a deployment has had two active ReplicaSets for 30 minutes and for 60 minutes
- Re-evaluate termination grace periods that were set to arbitrary large values
- Read the GKE release notes before every cluster upgrade
- Use auto-upgrade in non-production environments, and manual cluster upgrades with automatic node upgrades in production
- Keep environments as identical as possible, including resource names
- Lessons
Read the release notes before upgrading: the target version had been withdrawn five days earlier. Drain time depends on pod configuration, so emptyDir volumes, long grace periods and missing disruption budgets turn a NodePool upgrade into hours. Pre-production only catches problems like the ingress bug if it matches production down to resource names. Auto-upgrades in non-production surface problems early, and a mix of manual cluster upgrades and automatic node upgrades in production keeps clusters current without much effort.
These 2 cases involve GKE control plane and Admission webhook. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause2
Configuration change1 case
- Contributing factor
- Organisation
Cloud provider outage1 case
- Contributing factor
- Organisation