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.
$ cat /etc/pf9/nodelet/override.yaml
---
FULL_RETRY_COUNT: "1"Once this file is created, restart the pf9-nodeleted service:
~# systemctl restart pf9-nodeletedAdditional 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.
Last updated
