Skip to content

How-to guide

Kubernetes monitoring: what to watch and why

Kubernetes moves and restarts your workloads for you, which hides problems until they hurt. Monitor the cluster, the workloads and the user experience together.

3 min read10 sectionsUpdated

On this page

Key points

  • Measure pods against their limits, not against the node.
  • Restarts, pending pods and failed rollouts are the cluster-level alerts that matter.
  • Trace the services running in the cluster to see request-level problems.
  • Always add outside checks: a healthy cluster can still be unreachable.

Four layers to watch

LayerKey signalsExample alert
ClusterNode count, pending pods, API server errorsPods pending for more than 10 minutes
NodesCPU, memory, disk, pressure conditionsNode disk above 85% or DiskPressure true
WorkloadsDesired vs available replicas, rollout status, restartsDeployment below desired replicas for 10 minutes
Pods / containersCPU and memory against limits, throttling, OOM killsMemory above 90% of limit for 5 minutes

Why limits change everything

A pod limited to 500m CPU running at 480m is near saturation even if its node is 20% busy. Throttling then shows up as latency, not as high CPU. Memory works the same way, except the result is an OOMKilled container. Always chart usage as a share of the container's limit, and alert per pod so one hot replica is not averaged away by the others.

Quick checks from the command line

bash
kubectl get nodes -o wide
kubectl top nodes
kubectl top pods -A --sort-by=memory | head -n 20
kubectl get pods -A --field-selector=status.phase!=Running
kubectl get deploy -A | awk '$3 != $4'          # READY differs from desired
kubectl get events -A --sort-by=.lastTimestamp | tail -n 30

Monitor what runs inside

Cluster metrics say a pod is busy; they do not say which request is slow. Instrument services with OpenTelemetry and run a Collector in the cluster (as a DaemonSet or a Deployment) to receive traces and metrics and forward them. Add k8s.namespace.name, k8s.pod.name and k8s.deployment.name with the Collector's k8sattributes processor, so a slow trace points to the exact pod.

Check from outside

Ingress controllers, DNS, certificates and cloud load balancers sit outside your pods. An uptime check on the public URL catches failures there that no in-cluster metric reports.

In VitalRix

Infrastructure monitoring shows clusters, namespaces, workloads and pods with CPU and memory meters against limits, restart counts and reporting status, on a map coloured by usage. You can report with the VitalRix agent (an API key with metric.write; it sends metrics only) or send host and Kubernetes metrics from an OpenTelemetry Collector. Alert rules on CPU or memory watch each instance separately. APM covers the services; uptime monitoring covers the outside.

Frequently asked questions

Do I need Prometheus to monitor Kubernetes?

No. Prometheus is common, but an OpenTelemetry Collector or a vendor agent can collect the same node and pod metrics and send them to a backend.

What are the most important Kubernetes alerts?

Pods crash-looping or OOM-killed, deployments below desired replicas, pods pending, nodes under disk or memory pressure, and user-facing error rate and latency.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.