0
0
Kubernetesdevops~20 mins

DNS in Kubernetes (CoreDNS) - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
CoreDNS Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
CoreDNS Pod DNS Resolution Output
You run the command kubectl exec -it coredns-abc123 -- nslookup kubernetes.default. What is the expected output?
A
Server: 10.96.0.10
Address: 10.96.0.10#53

Name: kubernetes.default.svc.cluster.local
Address: 10.96.0.1
BError: unable to resolve host kubernetes.default
C
Server: 8.8.8.8
Address: 8.8.8.8#53

Name: kubernetes.default
Address: 8.8.8.8
D
Server: 127.0.0.1
Address: 127.0.0.1#53

** server can't find kubernetes.default: NXDOMAIN
Attempts:
2 left
💡 Hint
CoreDNS runs inside the cluster and resolves cluster DNS names using the cluster DNS IP.
Configuration
intermediate
2:00remaining
CoreDNS ConfigMap Block for Forwarding External DNS
Which CoreDNS ConfigMap snippet correctly forwards external DNS queries to 8.8.8.8?
A
.:53 {
    forward 8.8.8.8
    errors
    cache 30
}
B
.:53 {
    proxy . 8.8.8.8
    errors
    cache 30
}
C
.:53 {
    forward . 8.8.8.8:53
    errors
    cache 30
}
D
.:53 {
    forward . 8.8.8.8
    errors
    cache 30
}
Attempts:
2 left
💡 Hint
The 'forward' plugin requires the domain '.' and the IP address of the DNS server.
Troubleshoot
advanced
2:00remaining
CoreDNS Fails to Resolve Internal Service Names
You notice pods cannot resolve internal service names like myservice.default.svc.cluster.local. Which is the most likely cause?
AThe external DNS server 8.8.8.8 is unreachable
BCoreDNS pods are not running or CrashLoopBackOff
CThe pod's /etc/resolv.conf points to 127.0.0.1
DThe service has no endpoints
Attempts:
2 left
💡 Hint
CoreDNS must be healthy to resolve cluster DNS names.
🔀 Workflow
advanced
2:00remaining
Steps to Update CoreDNS ConfigMap and Apply Changes
What is the correct sequence to update CoreDNS ConfigMap and apply changes in Kubernetes?
A1,2,3,4
B2,1,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint
Edit first, then restart pods, then verify and test.
Best Practice
expert
2:00remaining
Best Practice for CoreDNS High Availability
Which option describes the best practice to ensure CoreDNS high availability in a Kubernetes cluster?
ADisable CoreDNS and use external DNS servers only
BRun a single CoreDNS pod on the master node only
CRun multiple CoreDNS replicas across different nodes with PodDisruptionBudgets
DRun CoreDNS pods without resource limits to maximize performance
Attempts:
2 left
💡 Hint
High availability means no single point of failure and controlled disruptions.