Cases2 cases
1 to 2 of 2
IL-0110A Grafana Agent pod's high memory use and crash-looping Hangfire pods drove a Kubernetes node into system OOM and NotReady, twice in one dayDFDS2024- Symptoms
At 10:01 UTC on 2024-03-13 a Kubernetes node entered NotReady state, with CPU requests at 78% and memory requests at 82%. An alert fired in Slack at 10:03 and was picked up at 10:05. An attempt to SSH into the node at 10:13 failed because it was unresponsive; it started responding again at 10:19.
- Trigger
Pods of a dev container that used Hangfire to trigger jobs failed with OOM and crash-looped on a node where a Grafana Agent pod was already using a lot of memory.
- Root cause
- Component
- Contributing factor
- Detection
A Slack alert fired two minutes after the node went NotReady and was picked up two minutes later; the second node's NotReady at 15:03 also raised a Slack alert.
- Remediation
- marked the EC2 instance unhealthy so a new node started
- cordoned and force-drained the NotReady node and terminated its EC2 instance
- removed the new LimitRange from the Grafana Agent namespace and restarted the Grafana Agent pod
- scaled the dev container to 0 replicas, after which EC2 network traffic returned to normal
- after the second NotReady, scaled the dev container to 0 replicas again and added a new node
- emailed the team that owns the dev container, which confirmed it was working on a fix
- Action items
- Move grafana-agent to the monitoring node group
- Add alerts for when bandwidth across the cluster reaches a certain threshold
- Investigate whether memory limits can be set on the grafana-agent Helm chart
- Investigate grafana-agent memory usage
- Ask Grafana support whether grafana-agent should use a PVC
- Consider pushing node logs to Loki with limited retention
- Create a wiki page with common metrics and log queries to check when investigating issues with Kubernetes nodes
- Lessons
Dev workloads mixed with production let one crash-looping dev container take down nodes that production also used, and a monitoring agent outside its dedicated node group added to the memory pressure. Scaling the suspect container back up before its owners had fixed it brought the failure back on the replacement node. The team also noted that action items from earlier post-mortems need follow-up, and that knowledge of useful CloudWatch metrics had not been shared, which made the diagnosis harder.
IL-0037Image registry rate-limited a whole region after a crash-looping DaemonSet with imagePullPolicy Always pulled through three NAT instancesDatadog2019- Symptoms
Users reported that their jobs were not starting, with some sign that image pulls were involved. Many pods across the cluster were in error states related to image pulls, while applications that were already running were not affected.
- Trigger
A change to the permissions on a storage bucket that one application needed to read. The application could no longer start, and its DaemonSet, running on roughly a thousand nodes of the cluster, went into a crash loop with imagePullPolicy: Always, so every restart pulled the image again although it was already on the node.
- Root cause
- Component
- Contributing factor
- Detection
Users reported that their jobs were not starting; monitoring had not caught it first.
- Remediation
- replaced the affected NAT instances so registry traffic came from new source IPs
- reconfigured the static IPs and firewall rules so applications could reach the Cloud SQL database again
- Action items
- Add an admission webhook that rejects floating image tags, starting with latest
- Apply the image tag webhook to workload objects only, not to pods, after it blocked pods created by in-cluster controllers
- Lessons
The speakers' takeaway is to be very careful with DaemonSets in large clusters: they say they had broken everything DaemonSets depend on, including DNS, Vault and the image repository, and that it is very easy to break things when managing them by the thousand. imagePullPolicy: Always made every crash-loop restart pull the image again. Sending all registry traffic through three NAT instances put the whole region behind three source IPs, which the registry rate-limited, and changing those IPs cut the connections to a critical database reached over the internet through them. An admission webhook on pods rejects the pods that controllers in the cluster create, where no user sees the error.
These 2 cases involve Application database 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 cause1
Capacity exhaustion2 cases
- Component
- Contributing factor
IL-0110A Grafana Agent pod's high memory use and crash-looping Hangfire pods drove a Kubernetes node into system OOM and NotReady, twice in one dayDFDS2024IL-0037Image registry rate-limited a whole region after a crash-looping DaemonSet with imagePullPolicy Always pulled through three NAT instancesDatadog2019