nerdexam
Linux_Foundation

KCNA · Question #118

Which command lists the running containers in the current Kubernetes namespace?

The correct answer is A. kubectl get pods. The kubectl get pods command lists all pods in the current Kubernetes namespace, showing their status, including those with running containers.

Submitted by yasin.bd· May 4, 2026Kubernetes Fundamentals

Question

Which command lists the running containers in the current Kubernetes namespace?

Options

  • Akubectl get pods
  • Bkubectl ls
  • Ckubectl ps
  • Dkubectl show pods

How the community answered

(19 responses)
  • A
    95% (18)
  • D
    5% (1)

Why each option

The `kubectl get pods` command lists all pods in the current Kubernetes namespace, showing their status, including those with running containers.

Akubectl get podsCorrect

In Kubernetes, containers run inside Pods, and `kubectl get pods` is the standard and most direct command to list all Pods in the current namespace, along with their current status like 'Running', 'Pending', or 'Completed'.

Bkubectl ls

`kubectl ls` is not a standard Kubernetes command for listing resources.

Ckubectl ps

`kubectl ps` is not a standard Kubernetes command; while `docker ps` lists running containers in Docker, Kubernetes uses `kubectl get pods`.

Dkubectl show pods

`kubectl show pods` is not a standard Kubernetes command for listing pods; the correct verb is `get`.

Concept tested: Kubernetes Pod listing command

Source: https://kubernetes.io/docs/reference/kubectl/cheatsheet/#viewing-finding-resources

Topics

#kubectl commands#Pods#Listing resources#Kubernetes basics

Community Discussion

No community discussion yet for this question.

Full KCNA Practice