Which command is used to view all resources within all namespaces in a Kubernetes cluster?

Prepare for the KCNA Certification Test. Study with flashcards, multiple-choice questions, and detailed explanations to enhance your understanding of Kubernetes Cloud Native concepts. Ace your exam!

Multiple Choice

Which command is used to view all resources within all namespaces in a Kubernetes cluster?

Explanation:
Viewing all resources across all namespaces with full details is accomplished by kubectl describe all -A. The -A flag (or --all-namespaces) tells kubectl to operate across every namespace, and describe all expands to describe every resource type (pods, services, deployments, etc.) in those namespaces. This provides detailed information about each resource, including status and events, not just a simple list. While using get all -A would give a concise listing, describe all -A gives a richer view, which is why it’s the best match for “view all resources within all namespaces” here. The other options fail because -n expects a specific namespace (not all), there’s no kubectl list command, and describe across all namespaces is valid and intended for detailed inspection.

Viewing all resources across all namespaces with full details is accomplished by kubectl describe all -A. The -A flag (or --all-namespaces) tells kubectl to operate across every namespace, and describe all expands to describe every resource type (pods, services, deployments, etc.) in those namespaces. This provides detailed information about each resource, including status and events, not just a simple list. While using get all -A would give a concise listing, describe all -A gives a richer view, which is why it’s the best match for “view all resources within all namespaces” here. The other options fail because -n expects a specific namespace (not all), there’s no kubectl list command, and describe across all namespaces is valid and intended for detailed inspection.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy