Bird
0
0

Which command shows the description of the metadata.labels field of a Service?

easy📝 Conceptual Q2 of 15
Kubernetes - kubectl Essential Commands
Which command shows the description of the metadata.labels field of a Service?
Akubectl get service.metadata.labels
Bkubectl explain service.metadata.labels
Ckubectl describe service labels
Dkubectl logs service.metadata.labels
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct command for API field explanation

    kubectl explain with the full field path shows API documentation for that field.
  2. Step 2: Match the field path to the command

    service.metadata.labels is the correct path to get label info in Service resource.
  3. Final Answer:

    kubectl explain service.metadata.labels -> Option B
  4. Quick Check:

    kubectl explain service.metadata.labels = Field description [OK]
Quick Trick: Use full field path with kubectl explain for nested info [OK]
Common Mistakes:
  • Using get or describe instead of explain for API docs
  • Omitting the full field path
  • Trying to get logs for metadata fields

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes