sysadmincrispy
sysadmincrispy

Reputation: 127

Aks ImagePullbackoff not getting alerted in Pending Pods Alert

I had set an alert in azure monitor for pending pods with kube pod phase set to pending in azure monitor. It only get alerted for pending pods and not ImagePullBack and CrashloopbackOFF . is there a way to get alerts for these too.

Upvotes: 0

Views: 518

Answers (1)

Philip Welz
Philip Welz

Reputation: 2807

You can create a custom Alert for CrashLoopBackOff & ImagePullBackOff based on this Kusto Query:

KubePodInventory 
  | where PodStatus == 'Pending'
  | where ContainerStatusReason in ('ErrImagePull','ImagePullBackOff')

Upvotes: 2

Related Questions