nerdexam
Broadcom-VMware

5V0-23.20 · Question #42

Which kubectl command is used to list al pods in the current active namespace?

The correct answer is B. kubectl get pods. Fetch all Pods in all namespaces using kubectl get pods --all-namespaces List one or more pods kubectl delete pod <pod_name> Display the detailed state of a pods kubectl describe pod <pod_name> kubectl create pod <pod_name> Execute a command against a container in a pod kubectl…

Operating and Administering vSphere with Tanzu

Question

Which kubectl command is used to list al pods in the current active namespace?

Options

  • Akubectl get nodes
  • Bkubectl get pods
  • Ckubectl get services
  • Dkubectl list pods

How the community answered

(34 responses)
  • A
    18% (6)
  • B
    71% (24)
  • C
    9% (3)
  • D
    3% (1)

Explanation

Fetch all Pods in all namespaces using kubectl get pods --all-namespaces List one or more pods kubectl delete pod <pod_name> Display the detailed state of a pods kubectl describe pod <pod_name> kubectl create pod <pod_name> Execute a command against a container in a pod kubectl exec <pod_name> -c <container_name> <command> Get interactive shell on a a single-container pod kubectl exec -it <pod_name> /bin/sh Display Resource usage (CPU/Memory/Storage) for pods kubectl top pod Add or update the annotations of a pod kubectl annotate pod <pod_name> <annotation> Add or update the label of a pod kubectl label pod <pod_name>

Topics

#kubectl#pods#namespace#get command

Community Discussion

No community discussion yet for this question.

Full 5V0-23.20 Practice