1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/getting-started-cli-examining-pod.adoc

74 lines
2.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * tutorials/dev-app-cli.adoc
:_mod-docs-content-type: PROCEDURE
[id="getting-started-cli-examining-pod_{context}"]
= Viewing pod details
{product-title} 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 `parksmap` front-end application.
.Procedure
* List all pods in the current project by running the following command:
+
[source,terminal]
----
$ oc get pods
----
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
parksmap-5f9579955-6sng8 1/1 Running 0 77s
----
* Show details for a pod by running the following command:
+
[source,terminal]
----
$ oc describe pod parksmap-5f9579955-6sng8
----
+
.Example output
[source,terminal]
----
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:
+
[source,terminal]
----
$ oc logs parksmap-5f9579955-6sng8
----
+
.Example output
[source,terminal]
----
...
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)
----