<p>In <a href="https://github.com/kubernetes/kube-state-metrics/blob/master/Documentation/pod-metrics.md" rel="nofollow noreferrer">kube-state-metrics</a> there is a metric for pods - <code>kube_pod_status_ready</code> that has 3 attributes</p>

<pre><code>pod=&lt;pod-name&gt;  
namespace=&lt;pod-namespace&gt; 
condition=&lt;true|false|unknown&gt;
</code></pre>

<p>What does <code>condition</code> attribute stand for? I can't find it's definition anywhere in the docs. I can guess what it means, but it would be great to get a definition or explanation of how it's calculated.</p>

<p>That's documented in the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#podcondition-v1-core" rel="nofollow noreferrer">API reference</a>. In essence it's the condition in the <code>status</code> field for <code>"type": "Ready"</code> for a given pod. For example in the following output:</p>

<pre><code>$ kubectl get pod &lt;your-pod&gt; -o=json | jq .status.conditions
[
  ...
  {
    "lastProbeTime": null,
    "lastTransitionTime": "2018-11-20T22:45:27Z",
    "status": "True",
    "type": "Ready"
  },
  ...
]
</code></pre>

<p>In this case, the sub-field <code>"status": "True"</code> represents <code>condition=true</code> in your metrics. Alternatively, <code>"status": "False"</code> would represent <code>condition=false</code> and <code>"status": "Unknown"</code> would represent <code>condition=unknown</code>.</p>
