I can see from the pod description that my pod "Failed" due to being "Evicted" due to Memory Pressure. but how can i test for too many "Failed && Evicted" pods with prometheus alert rules or some other means?
I have Prometheus Operator installed, I can see metrics for Failed Pods but not Failed and Evicted
kubectl describe pod gives:
Name: besteffort-evictme-001
Namespace: skyfii
Priority: 0
Node: ip-172-17-2-169.ap-southeast-2.compute.internal/
Start Time: Fri, 24 Sep 2021 15:28:53 +1000
Labels: <none>
Annotations: kubernetes.io/psp: eks.privileged
Status: Failed
Reason: Evicted
Message: The node was low on resource: memory. Container termination-demo-container was using 17165108Ki, which exceeds its request of 0.
IP:
IPs: <none>
Containers:
the prometheus rule :
kube_pod_status_phase{phase="Failed"} > 0
shows the failed pod
kube_pod_status_phase{endpoint="http",instance="172.17.3.141:8080",job="kube-state-metrics",namespace="skyfii",phase="Failed",pod="besteffort-evictme-001",service="prometheus-kube-state-metrics"}
but nothing shows up for
kube_pod_container_status_terminated_reason{reason="Evicted"} > 0
Any Ideas?
Thanks Karl

