Interview Prep/Monitoring & Observability/Kubernetes monitoring and the Prometheus Operator

Pods in a namespace have no cAdvisor metrics but node metrics are fine

IntermediateTroubleshootingKubernetes monitoring and the Prometheus Operator
Answer

Likely causes → A metric_relabel_configs drop on the cAdvisor job, or the container runtime changed and labels (container, pod) are empty.

Diagnose →

count by (namespace) (container_cpu_usage_seconds_total)

Curl kubectl get --raw /api/v1/nodes/<node>/proxy/metrics/cadvisor | grep <ns>.

Fix → Fix relabel rules; upgrade kubelet/containerd if labels are empty.

Prevent → Alert when a namespace with pods has zero container metrics.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Kubernetes monitoring and the Prometheus Operator