<pre><code>{__name__="kube_pod_status_phase",namespace="mynamespace",phase="Failed"}
</code></pre>

<p>When I run the aforementioned PromQL query, it also returns pods that have never failed (what I see in Kubernetes). The pod is in running status and has never failed or restarted. How is Prometheus marking it as "Failed"?</p>

user2425909
<p>According to <a href="https://github.com/kubernetes/kube-state-metrics/issues/568#issuecomment-442745590" rel="nofollow noreferrer">this</a>, the <code>kube_pod_status_phase</code> metric is an enum metric, and exposes a time-series for each possible state. However, only the one the Pod is in has the value of <code>1</code>.</p>

<p>So if you want to see actually <code>Failed</code> Pods, execute this query:</p>

<pre><code>kube_pod_status_phase{namespace="mynamespace",phase="Failed"} == 1
</code></pre>
