kubectl command lists one or more resources.

Core Answer

The correct kubectl command that lists one or more resources is kubectl get.

Reasons and Explanations

  • Reason 1: In Kubernetes, the kubectl get command is specifically designed to retrieve and display information about one or more resources in a cluster. It shows a concise, formatted view of specified resources.
  • Reason 2: kubectl list is not a valid built-in command in the standard kubectl command set. This option doesn’t exist in the core kubectl toolset.
  • Reason 3: kubectl desc is an incomplete command. The actual command is kubectl describe, which provides detailed information about a specific resource rather than listing multiple resources. It shows much more detailed information than the get command.

Summary

Among the options provided, only kubectl get is the correct command used to list one or more resources in a Kubernetes cluster. This command allows users to retrieve information about pods, services, deployments, and other Kubernetes resources in a concise format.

Read more here: Source link