Bird
0
0

You added the label app.kubernetes.io/managed-by: helm to a deployment, but kubectl get deployment -l app.kubernetes.io/managed-by=helm returns no results. What is the likely cause?

medium📝 Troubleshoot Q6 of 15
Kubernetes - Labels and Selectors
You added the label app.kubernetes.io/managed-by: helm to a deployment, but kubectl get deployment -l app.kubernetes.io/managed-by=helm returns no results. What is the likely cause?
AThe label value should be uppercase 'Helm'
BThe label key is misspelled in the selector
CThe label was added under annotations instead of labels
DThe deployment is not running
Step-by-Step Solution
Solution:
  1. Step 1: Check where the label was added

    If the label was mistakenly added under annotations, it won't be found by label selectors.
  2. Step 2: Verify label selector and deployment status

    Misspelling or deployment status would cause different symptoms; label value case is case-sensitive but usually lowercase is correct.
  3. Final Answer:

    The label was added under annotations instead of labels -> Option C
  4. Quick Check:

    Labels must be under metadata.labels to be selectable [OK]
Quick Trick: Labels must be under metadata.labels, not annotations [OK]
Common Mistakes:
  • Adding labels under annotations
  • Misspelling label keys
  • Ignoring case sensitivity

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes