3.4.2. Viewing pod details
Retrieve detailed pod information to confirm the running status and resource configuration of the applications in this tutorial.
OpenShift Container Platform uses the Kubernetes concept of a pod, which is one or more containers deployed together on one host, and the smallest compute unit that can be defined, deployed, and managed. Pods are the rough equivalent of a machine instance, physical or virtual, to a container.
You can view the pods in your cluster and to determine the health of those pods and the cluster as a whole.
Prerequisites
-
You have deployed the
parksmapfront-end application.
Procedure
List all pods in the current project by running the following command:
$ oc get podsExample output
NAME READY STATUS RESTARTS AGE parksmap-5f9579955-6sng8 1/1 Running 0 77sShow details for a pod by running the following command:
$ oc describe pod parksmap-5f9579955-6sng8Example output
Name: parksmap-5f9579955-6sng8 Namespace: user-getting-started Priority: 0 Service Account: default Node: ci-ln-fr1rt92-72292-4fzf9-worker-a-g9g7c/10.0.128.4 Start Time: Wed, 26 Mar 2025 14:03:19 -0400 Labels: app=national-parks-app app.kubernetes.io/part-of=national-parks-app component=parksmap deployment=parksmap pod-template-hash=848bd4954b role=frontend ...View logs for a pod by running the following command:
$ oc logs parksmap-5f9579955-6sng8Example output
... 2025-03-26 18:03:24.774 INFO 1 --- [ main] o.s.m.s.b.SimpleBrokerMessageHandler : Started. 2025-03-26 18:03:24.798 INFO 1 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http) 2025-03-26 18:03:24.801 INFO 1 --- [ main] c.o.evg.roadshow.ParksMapApplication : Started ParksMapApplication in 4.053 seconds (JVM running for 4.46)