Why Kubernetes needs its own monitoring
Kubernetes is built to heal: a crashed container restarts, a lost node is replaced, a failed rollout is retried. That is good for uptime and bad for visibility, because the same restart that keeps a service up also erases the evidence. A pod in CrashLoopBackOff can serve some traffic for hours, a node under memory pressure quietly evicts pods, and a Deployment can sit half-rolled-out while every dashboard shows “Running”. Monitoring Kubernetes means watching the state the scheduler sees, not only the CPU graph of a server.
Cluster level: is the control plane keeping up?
Start at the top. You want to know how many nodes are Ready, whether the API server answers, how many pods are Pending (waiting for room), and what events the cluster raised recently. A sudden rise in Pending pods usually means the cluster is out of CPU or memory requests, not that anything crashed.
- •Nodes Ready vs total
- •Pods Pending, Failed and Unknown
- •Warning events in the last hour (FailedScheduling, BackOff, OOMKilled, Evicted)
- •Recent rollouts and which image they changed
Node level: pressure before failure
Each node reports conditions — MemoryPressure, DiskPressure, PIDPressure and Ready — and taints that keep pods away. Pressure conditions come before evictions, so they are your early warning. Watch allocatable versus requested CPU and memory per node: a node that is 95% requested cannot take the next pod even if its real usage is low.
Workload and pod level: the signals that catch real incidents
Most outages show up first as pod behaviour. A Deployment with fewer ready replicas than desired, a container whose restart count keeps climbing, or a pod that was OOMKilled are the patterns that precede user-visible errors. Pod status alone is not enough — a pod can be Running and still failing its readiness probe.
- •Desired vs ready replicas per Deployment, StatefulSet and DaemonSet
- •Container restarts and the last termination reason (OOMKilled, Error, Completed)
- •Readiness and liveness probe failures
- •Image pull errors (ImagePullBackOff, ErrImagePull)
- •Per-namespace resource use, to see which team or service is growing
Connect the cluster to the request
Knowing that pod checkout-7f9 restarted is half the story; knowing it served the slow checkout requests your users hit is the other half. Link traces to Kubernetes by putting the pod, namespace and node on every span (OpenTelemetry’s k8s.* resource attributes). Then a slow trace opens the pod that served it, and a pod restart shows the requests that failed around it.
How to set it up with AppStatus
AppStatus monitors Kubernetes with one Helm chart (k8s-agent). The chart runs a cluster agent with a read-only ClusterRole (get, list and watch), and it pushes nodes, workloads, pods, services, namespaces, storage and events to your workspace. Get Started writes the full helm upgrade --install command with your cluster id and key. Optional eBPF tracing runs one agent per node and traces HTTP, gRPC, SQL, Redis, Kafka and MongoDB calls without code changes, and Kubernetes attributes are promoted onto every span. One cluster can be shared by several applications, and removing an application never removes the cluster for the others.
- •helm repo add appstatus https://agent.appstatus.io/charts
- •helm upgrade --install appstatus-k8s-agent appstatus/k8s-agent -n appstatus (Get Started adds the cluster id and key)
- •kubectl get pods -n appstatus to check the agent is Running
Alerts that are worth waking up for
Alert on symptoms that need a person: a Deployment below its desired replicas for more than a few minutes, a container restarting repeatedly, a node NotReady, or a namespace near its quota. Do not alert on every Warning event — group them into an incident and look at them together. In AppStatus, alerts that fire together become one incident, and the War Room keeps the timeline.
Common mistakes
Most Kubernetes monitoring gaps come from watching the machines instead of the scheduler’s view of the workloads.
- •Watching only node CPU and memory, and missing pods stuck Pending
- •Trusting “Running” without checking readiness
- •Alerting on every restart instead of restart loops
- •No link between traces and pods, so a slow request cannot be traced to the pod that served it
- •Forgetting egress: an agent that cannot reach its endpoint looks like a healthy, quiet cluster