Kubernetes - ServicesWhy does a Kubernetes Service selector require exact label matches instead of partial or fuzzy matches?ABecause Kubernetes does not support labels on podsBBecause selectors automatically match all pods in the clusterCTo allow Services to select pods by IP address insteadDTo ensure precise routing to intended pods and avoid ambiguityCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand the purpose of exact label matchingExact matches ensure Services route traffic only to the correct pods, avoiding mistakes or unintended targets.Step 2: Eliminate incorrect optionsKubernetes supports labels on pods, selectors do not select by IP, and selectors do not match all pods automatically.Final Answer:To ensure precise routing to intended pods and avoid ambiguity -> Option DQuick Check:Exact label matching ensures precise pod selection [OK]Quick Trick: Exact matches avoid routing mistakes and ambiguity [OK]Common Mistakes:Thinking selectors match pods by IPAssuming fuzzy or partial label matches workBelieving selectors match all pods by default
Master "Services" in Kubernetes9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kubernetes Quizzes Labels and Selectors - Organizing with recommended labels - Quiz 12easy Labels and Selectors - Label selectors (equality, set-based) - Quiz 5medium Namespaces - Default namespaces overview - Quiz 1easy Namespaces - Default namespaces overview - Quiz 11easy Pods - Init containers - Quiz 13medium Pods - Executing commands in Pods - Quiz 5medium Pods - Deleting Pods - Quiz 15hard ReplicaSets and Deployments - Rolling update strategy - Quiz 1easy ReplicaSets and Deployments - Deployment status and history - Quiz 14medium kubectl Essential Commands - kubectl delete for removal - Quiz 3easy