mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
125 lines
4.8 KiB
Plaintext
125 lines
4.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * getting-started/openshift-cli.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="getting-started-cli-examining-pod_{context}"]
|
|
= Examining the pod
|
|
|
|
{product-title} leverages 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 must have access to an {product-title} cluster.
|
|
* You must have installed the OpenShift CLI (`oc`).
|
|
* You have a deployed image.
|
|
|
|
.Procedure
|
|
. To list all pods with node names, enter 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
|
|
----
|
|
|
|
. To list all pod details, enter the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc describe pods
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
Name: parksmap-848bd4954b-5pvcc
|
|
Namespace: user-getting-started
|
|
Priority: 0
|
|
Node: ci-ln-fr1rt92-72292-4fzf9-worker-a-g9g7c/10.0.128.4
|
|
Start Time: Sun, 13 Feb 2022 14:14:14 -0500
|
|
Labels: app=national-parks-app
|
|
app.kubernetes.io/part-of=national-parks-app
|
|
component=parksmap
|
|
deployment=parksmap
|
|
pod-template-hash=848bd4954b
|
|
role=frontend
|
|
Annotations: k8s.v1.cni.cncf.io/network-status:
|
|
[{
|
|
"name": "ovn-kubernetes",
|
|
"interface": "eth0",
|
|
"ips": [
|
|
"10.131.0.14"
|
|
],
|
|
"default": true,
|
|
"dns": {}
|
|
}]
|
|
k8s.v1.cni.cncf.io/network-status:
|
|
[{
|
|
"name": "ovn-kubernetes",
|
|
"interface": "eth0",
|
|
"ips": [
|
|
"10.131.0.14"
|
|
],
|
|
"default": true,
|
|
"dns": {}
|
|
}]
|
|
openshift.io/generated-by: OpenShiftNewApp
|
|
openshift.io/scc: restricted
|
|
Status: Running
|
|
IP: 10.131.0.14
|
|
IPs:
|
|
IP: 10.131.0.14
|
|
Controlled By: ReplicaSet/parksmap-848bd4954b
|
|
Containers:
|
|
parksmap:
|
|
Container ID: cri-o://4b2625d4f61861e33cc95ad6d455915ea8ff6b75e17650538cc33c1e3e26aeb8
|
|
Image: quay.io/openshiftroadshow/parksmap@sha256:89d1e324846cb431df9039e1a7fd0ed2ba0c51aafbae73f2abd70a83d5fa173b
|
|
Image ID: quay.io/openshiftroadshow/parksmap@sha256:89d1e324846cb431df9039e1a7fd0ed2ba0c51aafbae73f2abd70a83d5fa173b
|
|
Port: 8080/TCP
|
|
Host Port: 0/TCP
|
|
State: Running
|
|
Started: Sun, 13 Feb 2022 14:14:25 -0500
|
|
Ready: True
|
|
Restart Count: 0
|
|
Environment: <none>
|
|
Mounts:
|
|
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-6f844 (ro)
|
|
Conditions:
|
|
Type Status
|
|
Initialized True
|
|
Ready True
|
|
ContainersReady True
|
|
PodScheduled True
|
|
Volumes:
|
|
kube-api-access-6f844:
|
|
Type: Projected (a volume that contains injected data from multiple sources)
|
|
TokenExpirationSeconds: 3607
|
|
ConfigMapName: kube-root-ca.crt
|
|
ConfigMapOptional: <nil>
|
|
DownwardAPI: true
|
|
ConfigMapName: openshift-service-ca.crt
|
|
ConfigMapOptional: <nil>
|
|
QoS Class: BestEffort
|
|
Node-Selectors: <none>
|
|
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
|
|
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
|
|
Events:
|
|
Type Reason Age From Message
|
|
---- ------ ---- ---- -------
|
|
Normal Scheduled 46s default-scheduler Successfully assigned user-getting-started/parksmap-848bd4954b-5pvcc to ci-ln-fr1rt92-72292-4fzf9-worker-a-g9g7c
|
|
Normal AddedInterface 44s multus Add eth0 [10.131.0.14/23] from ovn-kubernetes
|
|
Normal Pulling 44s kubelet Pulling image "quay.io/openshiftroadshow/parksmap@sha256:89d1e324846cb431df9039e1a7fd0ed2ba0c51aafbae73f2abd70a83d5fa173b"
|
|
Normal Pulled 35s kubelet Successfully pulled image "quay.io/openshiftroadshow/parksmap@sha256:89d1e324846cb431df9039e1a7fd0ed2ba0c51aafbae73f2abd70a83d5fa173b" in 9.49243308s
|
|
Normal Created 35s kubelet Created container parksmap
|
|
Normal Started 35s kubelet Started container parksmap
|
|
---- |