Back to all scenarios
Scenario #9
Cluster Management
K8s v1.24, DigitalOcean
CoreDNS CrashLoop on Startup
CoreDNS pods kept crashing due to a misconfigured Corefile.
Find this helpful?
What Happened
A team added a custom rewrite rule in the Corefile which had invalid syntax. CoreDNS failed to start.
Diagnosis Steps
- 1Checked logs: syntax error on startup.
- 2Used kubectl describe configmap coredns -n kube-system to inspect.
- 3Reproduced issue in test cluster.
Root Cause
Corefile misconfigured – incorrect directive placement.
Fix/Workaround
• Reverted to backup configmap.
• Restarted CoreDNS.
Lessons Learned
DNS misconfigurations can cascade quickly.
How to Avoid
- 1Use a CoreDNS validator before applying config.
- 2Maintain versioned backups of Corefile.