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

Prometheus StatefulSet pod stuck `Pending` with `0/6 nodes are available: 6 node(s) had volume node affinity conflict`

IntermediateTroubleshootingKubernetes monitoring and the Prometheus Operator
Answer

Likely causes → The EBS PV lives in one AZ, and there is no schedulable node in that AZ (node group scaled in or moved).

Diagnose →

kubectl get pv $(kubectl get pvc -n monitoring prometheus-k8s-db-prometheus-k8s-0 -o jsonpath='{.spec.volumeName}') -o jsonpath='{.spec.nodeAffinity}'
kubectl get nodes -L topology.kubernetes.io/zone

Fix → Add capacity in that AZ, or restore the data into a new volume in another AZ.

Prevent → Use volumeBindingMode: WaitForFirstConsumer and keep node groups spread across all AZs.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Kubernetes monitoring and the Prometheus Operator