Bird
0
0

What is the main difference between labels and annotations in Kubernetes?

easy📝 Conceptual Q1 of 15
Kubernetes - Labels and Selectors
What is the main difference between labels and annotations in Kubernetes?
AAnnotations are used for grouping objects; labels store non-identifying metadata.
BLabels are used for identifying and grouping objects; annotations store non-identifying metadata.
CLabels and annotations serve the same purpose and are interchangeable.
DAnnotations are only used for security settings, labels for networking.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of labels

    Labels are key-value pairs used to identify and select Kubernetes objects for grouping and querying.
  2. Step 2: Understand the purpose of annotations

    Annotations store additional metadata that is not used for selection but for storing information like build/release details.
  3. Final Answer:

    Labels identify and group objects; annotations store non-identifying metadata. -> Option B
  4. Quick Check:

    Labels vs Annotations = Identification vs Metadata [OK]
Quick Trick: Labels select; annotations describe extra info [OK]
Common Mistakes:
  • Confusing annotations as selectors
  • Thinking labels store large data
  • Assuming annotations affect scheduling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes