Bird
0
0

You want to track deployment metadata like git commit hash and build time without affecting pod selection. Which should you use and why?

hard📝 Workflow Q8 of 15
Kubernetes - Labels and Selectors
You want to track deployment metadata like git commit hash and build time without affecting pod selection. Which should you use and why?
AUse annotations because they store metadata without affecting selection.
BUse labels because they are designed for metadata storage.
CUse labels because annotations cannot store multiple values.
DUse environment variables instead of labels or annotations.
Step-by-Step Solution
Solution:
  1. Step 1: Identify metadata that should not affect selection

    Deployment info like git commit and build time are metadata, not selectors.
  2. Step 2: Choose between labels and annotations

    Annotations store metadata without affecting selection; labels are for selecting objects.
  3. Final Answer:

    Use annotations to store deployment metadata without affecting selection. -> Option A
  4. Quick Check:

    Metadata without selection = Annotations [OK]
Quick Trick: Annotations store metadata; labels select pods [OK]
Common Mistakes:
  • Using labels for non-selecting metadata
  • Thinking annotations can't store multiple values
  • Confusing environment variables with metadata

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes