Pod statuses

766 views
Skip to first unread message

Paolo Di Tommaso

unread,
Apr 21, 2016, 10:10:19 AM4/21/16
to kubernetes-dev
Hi, 

Where can I find an exhaustive list of all possible pod statuses returned by the `kubectl get pods` command? 


Thanks,
Paolo
 

Brian Grant

unread,
Apr 21, 2016, 10:16:11 AM4/21/16
to kubernetes-dev
What are you trying to do?

There isn't an exhaustive list. It's not an enum. Think of it as a terse message.

Paolo Di Tommaso

unread,
Apr 21, 2016, 10:26:36 AM4/21/16
to Brian Grant, kubernetes-dev
OK, let put it in an another way: what status messages are expected to be returned by `kubectl get pods`.

I'm asking that because I need to decode that status into another application os supposed to submit jobs to a Kubernetes cluster? 


Thanks,
Paolo


--
You received this message because you are subscribed to a topic in the Google Groups "kubernetes-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-dev/WVUtiCEgWQw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-de...@googlegroups.com.
To post to this group, send email to kuberne...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/75ae1969-4cf6-4b49-a655-532aca118d9c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Brian Grant

unread,
Apr 22, 2016, 11:26:51 AM4/22/16
to kubernetes-dev
On Thursday, April 21, 2016 at 7:26:36 AM UTC-7, Paolo Di Tommaso wrote:
OK, let put it in an another way: what status messages are expected to be returned by `kubectl get pods`.

I'm asking that because I need to decode that status into another application os supposed to submit jobs to a Kubernetes cluster? 

What do you want to do with the messages? Just display them to humans? Make decisions?

Either way, you probably want to use an API field, such as status.message or status.phase, rather than the get summary.

Get the full API object for a pod to see an example of what the fields contain: kubectl get pod mypod-wzyx3 -o yaml

Phase documentation is here:

Full API documentation is here:

Once you choose a field, you can use jsonpath or go templates to print just that field, if you plan to use kubectl to get the data from apiserver. Some examples can be found here:

Deepak Vohra

unread,
Apr 29, 2016, 6:16:09 PM4/29/16
to kubernetes-dev
Pod status codes are:
pending, running,succeeded, failed

Present

unread,
May 3, 2016, 11:05:40 PM5/3/16
to kubernetes-dev
Pending、Running、Succeeded、Failed、Unknown.

在 2016年4月21日星期四 UTC+8下午10:10:19,Paolo Di Tommaso写道:
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages