Bird
0
0

Identify the error in this label selector: app in web,api

medium📝 Troubleshoot Q6 of 15
Kubernetes - Labels and Selectors
Identify the error in this label selector: app in web,api
AMissing parentheses around values
BIncorrect use of 'in' operator
CUsing comma instead of space
DLabel key 'app' is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Review set-based selector syntax

    The correct syntax requires parentheses around the list of values: app in (web,api).
  2. Step 2: Identify error in given selector

    The selector lacks parentheses, so it's invalid syntax.
  3. Final Answer:

    Missing parentheses around values -> Option A
  4. Quick Check:

    Set-based selectors need parentheses [OK]
Quick Trick: Always use parentheses for 'in' value lists [OK]
Common Mistakes:
  • Omitting parentheses
  • Using spaces instead of commas
  • Misplacing operators

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes