Bootstrap FreeKB - OpenShift - View Pod events using oc describe or oc get
OpenShift - View Pod events using oc describe or oc get

Updated:   |  OpenShift articles

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

A pod runs on a node. Before issuing the oc describe pod command, issue the oc login command. The oc get pods command will return the list of pods in your selected project, like this.

oc get pods
. . .
NAME        READY   STATUS     RESTARTS  AGE
mypod001    1/1     Running    0         8d
mypod002    1/1     Running    0         8d
mypod003    1/1     Running    0         8d

 

The oc describe pod/<pod name> command can be used to display the pod events. In this example, the events for mypod001 will be displayed.

oc describe pod/mypod001

 

Something like this should be returned.

Events:
  Type    Reason     Age   From                 Message
  ----    ------     ----  ----                 -------
  Normal  Scheduled  3m    default-scheduler        Successfully assigned project001/mypod001-1-build to os.example.com
  Normal  Pulling    3m    kubelet, os.example.com  pulling image "repo.example.com/openshift/images:v3.11.219"
  Normal  Pulled     3m    kubelet, os.example.com  Successfully pulled image "repo.example.com/openshift/images:v3.11.219"
  Normal  Created    3m    kubelet, os.example.com  Created container
  Normal  Started    3m    kubelet, os.example.com  Started container

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 16a198 in the box below so that we can be sure you are a human.