⚡ ~/naveed Interview Prep
⚡ Portfolio Home 👤 About Naveed Bio & Credentials 📫 Contact Naveed Get In Touch ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All Networking & Cloud DNS Interview Questions Scenario 47 of 55 in Networking & Cloud DNS
Senior DevOps / SRE Networking DNS & CoreDNS Architecture Core Architecture

Q: How does DNS resolution work step-by-step from domain name to Kubernetes pod, and what role do root servers and CoreDNS play?

The definitive step-by-step journey of a DNS lookup: resolving root servers, TLD nameservers, authoritative nameservers, local recursive caches, and Kubernetes CoreDNS ndots:5 search path amplification.

#DNS #CoreDNS #Networking #Kubernetes #Architecture
🎙️ Candidate Opening & Architectural Context
"DNS resolution is a hierarchical distributed database lookup. A lookup traverses local cache, recursive resolvers, root nameservers, TLD nameservers, and authoritative nameservers, with special search path amplification inside Kubernetes."
Advertisement
⚡ Recommended Practice Lab

Want to master this scenario in a live sandbox? KodeKloud's Istio Service Mesh & Advanced Kubernetes Networking Course covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

Direct Answer: DNS resolution is a hierarchical distributed database lookup. A lookup traverses local cache, recursive resolvers, root nameservers, TLD nameservers, and authoritative nameservers, with special search path amplification inside Kubernetes.

1

Browser Cache & Recursive Resolver

Browser checks local memory cache -> OS resolver checks /etc/hosts and systemd-resolved -> forwards query to recursive resolver (e.g., 8.8.8.8 or AWS VPC Route 53 Resolver at VPC Base + 2).

2

Iterative Hierarchy: Root (.) -> TLD (.com) -> Authoritative Nameserver

Recursive resolver queries Root Nameserver (.) -> returns TLD nameserver for .com -> queries TLD nameserver -> returns Authoritative Nameserver (e.g., Route 53 ns-xxx.awsdns.com) -> returns the final A/AAAA/CNAME record with TTL.

Advertisement
3

Kubernetes Pod CoreDNS & ndots:5 Amplification

Inside Kubernetes, /etc/resolv.conf has ndots:5 and search paths (default.svc.cluster.local, svc.cluster.local, cluster.local). Any domain with fewer than 5 dots causes CoreDNS to query internal search domains first, generating up to 4 failed NXDOMAIN lookups before trying the external internet.

# /etc/resolv.conf in a pod
nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local
options ndots:5
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"DNS queries follow Root (.) -> TLD (.com) -> Authoritative nameserver. Inside Kubernetes, ndots:5 causes 4 sequential NXDOMAIN internal queries before external lookup."
⚡ 60-Second Elevator Pitch Talking Points
  • Browser checks local OS cache before sending query to recursive resolver.
  • Recursive resolver queries Root (.), then TLD (.com), then Authoritative nameserver for the A record.
  • In Kubernetes, CoreDNS handles internal cluster service discovery (.cluster.local).
  • Beware ndots:5: append a trailing dot (api.stripe.com.) in pods to bypass 4 redundant NXDOMAIN lookups.
⛔ Critical Candidate Mistakes to Avoid in This Scenario

Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:

  1. Treating stateless Network ACLs as stateful firewalls without specifying outbound ephemeral return ports when addressing step-by-step Security Groups track connection state automatically, whereas stateless Network ACLs require explicit ephemeral port rules (1024-65535) for return traffic.
  2. Opening short-lived non-pooled TCP client connections, exhausting ephemeral ports in TIME_WAIT state when addressing kubernetes Rapidly opening and closing short-lived TCP sockets without connection pooling exhausts ephemeral ports, causing connection refusal errors.
  3. Directing load balancer health checks to heavy computational endpoints rather than dedicated health routes Deep health check paths amplify database load during traffic spikes and risk cascading eviction of healthy application nodes.
  4. Triggering BGP route dampening by rapidly announcing and withdrawing multihomed network prefixes Rapidly flapping BGP route announcements triggers upstream ISP route dampening, effectively blackholing network traffic for hours.
Advertisement
Want more Networking & Cloud DNS scenarios?
Explore our complete collection of scenario-based Networking & Cloud DNS interview runbooks.
Browse All Networking & Cloud DNS Questions →