Bird
0
0

What does the command kubectl get nodes do in Kubernetes?

easy📝 Conceptual Q1 of 15
Kubernetes - kubectl Essential Commands
What does the command kubectl get nodes do in Kubernetes?
ADeletes all nodes in the cluster
BLists all the nodes in the Kubernetes cluster
CCreates a new node in the cluster
DShows logs of all nodes
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command kubectl get nodes

    This command is used to list resources of type 'nodes' in the cluster.
  2. Step 2: Identify the resource type 'nodes'

    Nodes are the machines (physical or virtual) that run your Kubernetes workloads.
  3. Final Answer:

    Lists all the nodes in the Kubernetes cluster -> Option B
  4. Quick Check:

    kubectl get nodes = Lists nodes [OK]
Quick Trick: Use 'kubectl get' plus resource name to list resources [OK]
Common Mistakes:
  • Confusing 'get' with 'delete' or 'create' commands
  • Thinking it shows logs instead of listing resources

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes