C1000-150 practice question 13 of 15

Which command is used to verify that all the pods are running after Operators are deployed?

Full set: 60 questions
Answer options
A: oc debug pods -n NAMESPACE
B: oc describe pods -n namespace
C: oc status pods -n NAMESPACE
D: oc get pods -n NAMESPACE Correct answer
Correct Answer:
D. oc get pods -n NAMESPACE
Explanation

The oc get pods command is the standard and most direct method used in OpenShift to list all pod resources within a specified namespace. Its output provides a concise, tabular view of each pod's name, ready state, overall status (e.g., Running, Pending, Completed), number of restarts, and age. This makes it the ideal command to quickly verify that all pods deployed by an Operator are in the expected 'Running' state after an installation or update.

Why Incorrect

A. oc debug pods -n NAMESPACE This command is for interactive troubleshooting by launching a debug container or attaching to a running pod, not for listing the status of all pods.
B. oc describe pods -n namespace This command provides verbose, detailed information and events for pods. It is used for in-depth investigation, not for a quick status overview.
C. oc status pods -n NAMESPACE The syntax is incorrect. The oc status command provides a high-level overview of a project but does not accept pods as an argument to list them.

References

1. Red Hat OpenShift Container Platform 4.10 Documentation: In the "Developer CLI reference

" the oc get command is described as the primary tool to "Display one or many resources." The examples show oc get pods being used to list pods and their statuses.

Source: Red Hat OpenShift Container Platform 4.10 Documentation

"Developer CLI reference"

Section: oc get.

2. IBM Cloud Pak for Business Automation v21.0.3 Documentation: The official installation guide repeatedly uses the oc get pods -n command in its post-installation verification steps to confirm that the components' pods are running successfully.

Source: IBM Documentation

IBM Cloud Pak for Business Automation v21.0.3

"Installing

" "Completing post-installation tasks

" "Checking the health of the deployment

" Step 1.

3. Kubernetes Documentation (Basis for OpenShift): The kubectl get pods command (which oc get pods is based on) is documented as the way to "List all pods in the current namespace in ps output format." This confirms its role as the standard for listing and status checking.

Source: Kubernetes Documentation

"kubectl Cheat Sheet

" Section: "Viewing and Finding Resources".

Scroll to Top