<p>Any idea how to get a POD status via Kubernetes REST API for a POD with known name?
I can do it via kubectl by just typing "kubectl get pods --all-namespaces" since the output lists STATUS as a separate column but not sure which REST API to use to get the STATUS of a running pod.
Thank you</p>

Vladimir Smogitel
<p>You can just query the API server:</p>

<pre><code>curl -k -X GET -H "Authorization: Bearer [REDACTED]" \
https://127.0.0.1:6443/api/v1/pods
</code></pre>

<p>If you want to get the status you can pipe them through something like <a href="https://stedolan.github.io/jq/" rel="nofollow noreferrer"><code>jq</code></a>:</p>

<pre><code>curl -k -X GET -H "Authorization: Bearer [REDACTED]" \ 
https://127.0.0.1:6443/api/v1/pods \
| jq '.items[] | .metadata.name + " " + .status.phase'
</code></pre>
