Bird
0
0

Given this ExternalName service YAML:

medium📝 Command Output Q13 of 15
Kubernetes - Services
Given this ExternalName service YAML:
apiVersion: v1
kind: Service
metadata:
  name: ext-service
spec:
  type: ExternalName
  externalName: api.example.com

What happens when a pod inside the cluster runs nslookup ext-service?
AIt returns the cluster IP of ext-service
BIt returns the IP address of the pod running the service
CIt returns an error because ExternalName services have no IP
DIt returns the IP address of api.example.com
Step-by-Step Solution
Solution:
  1. Step 1: Understand DNS resolution for ExternalName

    ExternalName services create a DNS CNAME record pointing to the externalName value, so queries resolve to that external DNS.
  2. Step 2: Analyze nslookup behavior

    Running nslookup ext-service returns the IP address of api.example.com by resolving the CNAME.
  3. Final Answer:

    It returns the IP address of api.example.com -> Option D
  4. Quick Check:

    ExternalName DNS = external DNS IP [OK]
Quick Trick: ExternalName returns external DNS IP on lookup [OK]
Common Mistakes:
  • Expecting pod or cluster IP for ExternalName
  • Thinking ExternalName has its own IP
  • Assuming nslookup fails for ExternalName

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes