Kubernetes - ServicesYou created an ExternalName service but pods cannot resolve the service name. What is the most likely cause?AThe externalName field is missing or incorrectBThe service selector is not matching any podsCThe service type is set to ClusterIP instead of ExternalNameDThe service port is not definedCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify cause of DNS resolution failureIf pods cannot resolve the ExternalName service, the externalName field is likely missing or has a wrong DNS name.Step 2: Understand irrelevant fieldsSelector and ports do not affect ExternalName DNS resolution. Service type must be ExternalName, but missing externalName is the main cause.Final Answer:The externalName field is missing or incorrect -> Option AQuick Check:Missing externalName causes resolution failure [OK]Quick Trick: Check externalName spelling if DNS fails [OK]Common Mistakes:Checking selectors which are ignoredChanging service type unnecessarilyExpecting ports to affect DNS
Master "Services" in Kubernetes9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kubernetes Quizzes Kubernetes Fundamentals - Setting up a local cluster (minikube, kind) - Quiz 12easy Kubernetes Fundamentals - Why container orchestration matters - Quiz 7medium Labels and Selectors - Adding labels to resources - Quiz 15hard Namespaces - Switching namespace context - Quiz 8hard Namespaces - Switching namespace context - Quiz 3easy Namespaces - Limit ranges for defaults - Quiz 8hard Pods - Sidecar container pattern - Quiz 2easy Pods - Why Pods are the smallest deployable unit - Quiz 8hard kubectl Essential Commands - kubectl get for listing resources - Quiz 9hard kubectl Essential Commands - kubectl logs for debugging - Quiz 11easy