# "kubectl get pods" - Getting pod status with/without custom-columns option

**URL:** <https://discuss.kubernetes.io/t/kubectl-get-pods-getting-pod-status-with-without-custom-columns-option/18718>\
**Category:** General Discussions\
**Created:** [January 13, 2022, 10:29am UTC](https://discuss.kubernetes.io/t/kubectl-get-pods-getting-pod-status-with-without-custom-columns-option/18718 "2022-01-13T10:29:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![noamz](https://avatars.discourse-cdn.com/v4/letter/n/278dde/32.png) [@noamz](https://discuss.kubernetes.io/u/noamz)\
**Post date:** [January 13, 2022, 10:29am UTC](https://discuss.kubernetes.io/t/kubectl-get-pods-getting-pod-status-with-without-custom-columns-option/18718/1 "2022-01-13T10:29:46Z")

</div>

### Cluster information:

Kubernetes version: 1.22.3  
Cloud being used: bare-metal  
Installation method:  
Host OS: Ubunto 20.04  
CNI and version:  
CRI and version:

Hello,  
The pods status I get when running _“kubectl get pods”_ is different than the pods status I get when running _“kubectl get pods -o=custom-columns=NAME:.metadata.name,STATUS:.status.phase”_.  
Specifically I see that when the pod status is “Terminated” when running the first command, it is “Running” when running the latter.  
Here is a screenshot that shows this scenario.

 ![Screenshot from 2022-01-13 12-08-51](https://us1.discourse-cdn.com/flex016/uploads/kubernetes/original/2X/6/673fd21c34a8a69003f687fbfeda6fb7992cdd9d.png)

Obviously the status.phase is not the same status as the one provided by “kubectl get pods”, but I haven’t found any way to get this status when using the custom-columns option.  
Is there anyway to do it?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Theog75](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/theog75/32/9241_2.png) [@Theog75](https://discuss.kubernetes.io/u/Theog75)\
**Post date:** [January 15, 2022, 2:54pm UTC](https://discuss.kubernetes.io/t/kubectl-get-pods-getting-pod-status-with-without-custom-columns-option/18718/2 "2022-01-15T14:54:27Z")

</div>

Do

```auto
Kubectl get pod <podname> -o yaml

```

In the status section (towards the end of the output) you should get the detailed and most current info about the pod.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![noamz](https://avatars.discourse-cdn.com/v4/letter/n/278dde/32.png) [@noamz](https://discuss.kubernetes.io/u/noamz)\
**Post date:** [January 16, 2022, 8:25am UTC](https://discuss.kubernetes.io/t/kubectl-get-pods-getting-pod-status-with-without-custom-columns-option/18718/3 "2022-01-16T08:25:50Z")

</div>

Thank you @Theog75 for your reply.  
I am aware of the “-o yaml” option you’ve suggested, but it’s not exactly what I am looking for because it doesn’t directly give the status provided by “kubectl get pods”.  
Currently I solved the problem by doing a kind of “hack” described here: [How to Determine the Pod Terminating status using REST API · Issue #22839 · kubernetes/kubernetes · GitHub](https://github.com/kubernetes/kubernetes/issues/22839)  
However, I think it would be helpful if the status provided by “kubectl get pods” can also be retrieved with the custom-columns option.
