How To Persist Changes to CoreDNS ConfigMap on PMK Cluster
Problem
Changes made to the CoreDNS ConfigMap do not persist after pf9-kube service restart.
Environment
- Platform9 Managed Kubernetes - v5.1 and K8s v1.19 and Lower
- CoreDNS
Answer
- When the pf9-kube service is restarted on the master nodes, the CoreDNS configurations are re-applied using the default template to ensure that resources are consistent.
- This is achieved by applying the template file
/opt/pf9/pf9-kube/conf/addons/dns/coredns.yaml
when kubectl apply is run during service startup. - In order to make the changes made to CoreDNS configMap persist across the pf9-kube service restarts you can make the changes to the existing CoreDNS configMap as well as to the files
/opt/pf9/pf9-kube/conf/addons/dns/coredns.yaml
and/etc/pf9/kube.d/addons/dns/coredns.yaml
respectively.
This will NOT ensure that the changes persist across the cluster upgrades. The changes will persist only across the service restarts.
Was this page helpful?