Bird
0
0

Which command correctly labels a Kubernetes namespace for automatic Istio sidecar injection?

easy📝 Syntax Q12 of 15
Kubernetes - Service Mesh
Which command correctly labels a Kubernetes namespace for automatic Istio sidecar injection?
Akubectl set namespace my-namespace istio-injection=enabled
Bkubectl annotate namespace my-namespace istio-injection=enabled
Ckubectl apply namespace my-namespace istio-injection=enabled
Dkubectl label namespace my-namespace istio-injection=enabled
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct command for labeling

    The command to add a label to a namespace is 'kubectl label namespace'.
  2. Step 2: Verify the label key and value

    The label key for Istio sidecar injection is 'istio-injection' and the value is 'enabled'.
  3. Final Answer:

    kubectl label namespace my-namespace istio-injection=enabled -> Option D
  4. Quick Check:

    Label namespace with 'istio-injection=enabled' using kubectl label [OK]
Quick Trick: Use 'kubectl label namespace' to add labels [OK]
Common Mistakes:
  • Using 'annotate' instead of 'label' for sidecar injection
  • Trying 'set' or 'apply' commands incorrectly
  • Missing the correct label key or value

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes