Incident Library
  • Root cause
  • Component
  • Symptom
  • Contributing factor
  • Case

Cases2 cases

1 to 2 of 2

  1. 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.

  2. Symptoms

    Dex, the OIDC proxy that handled Kubernetes authentication, stored its data in the Kubernetes API (storage type kubernetes, inCluster: true) and had built up a huge number of AuthRequest objects. Listing all AuthRequests timed out, and without the list they could not be deleted.

    Trigger

    The dex namespace was deleted so that Kubernetes would clean up the accumulated AuthRequest objects itself.

    Root cause
    Component
    Contributing factor
    Detection

    The speaker says he had got hints of the problem earlier. While the masters were down, plenty of alerts arrived in Slack, but monitoring could not be reached because authentication and port-forwarding no longer worked.

    Remediation
    • removed the kubernetes finalizer from the dex namespace by calling the API directly (kill-kube-ns)
    • deployed Dex to a new namespace with sane defaults
    Lessons

    Dex with Kubernetes as its storage keeps every AuthRequest as an API object, and with a long TTL they pile up until the API cannot list them. Deleting a namespace that holds that many objects makes Kubernetes list them in a loop and can overload the masters. Monitoring that is reached through cluster authentication is lost when authentication is what broke.

Check your cluster for this

These 2 cases involve Application database and etcd. 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