CoreDNS Configuration Not Re-Generated After Reboot
Problem
We have observed that changes made to CoreDNS template coredns.yaml in /opt/pf9/pf9-kube/conf/addons/dns are not reflected after the reboot of node. However, restarting pf9-kube service regenerates the coredns.yaml file from template.
Environment
- Platform9 Managed Kubernetes - All Versions
Cause
- This is by design to prevent a full restart of the pf9-kube chain and a status check is run before triggering stop and start of pf9-kube when the nodelet service starts. This allows us to avoid tasks like certificate generation, Docker restart every time nodelet is restarted.
- Explicit restart of the pf9-kube service performs a complete stop and start of the kube chain and therefore those files are re-generated.
Resolution
- If there is a requirement to regenerate the coredns.yaml file post reboot partial restarts can be disabled, and an override file can be created in /etc/pf9/nodelet with the following contents.
- Once this file is created, restart the pf9-nodeleted service:
Additional Information
- Note that disabling the partial restarts feature will restart the entire stack which will take longer than usual for the node.
- To persist the changes made to coredns.yaml refer to this article.
Was this page helpful?