Introspecting Running Pods

Let's examine the running Pod.

We'll cover the following

As good as the kubectl get pods command is, it’s a bit light on detail. Not to worry though; there’s plenty of options for deeper introspection.

First up, the kubectl get command offers a couple of really simple flags that give you more information:

The -o wide flag gives a couple more columns but is still a single line of output.

The -o yaml flag takes things to the next level. This returns a full copy of the Pod manifest from the cluster store. The output is broadly divided into two parts:

  • desired state (.spec)
  • current observed state (.status)

The following command shows a snipped version of a kubectl get pods -o yaml command.

Get hands-on with 1200+ tech skills courses.