How To Customize CoreDNS Configuration for Adding Additional External DNS
Problem
How To Customize CoreDNS Configuration for Adding Additional External DNS.
Environment
Platform9 Managed Kubernetes - v5.2 and K8s v1.20 and Higher
AddOn Management
Procedure
Generate the TOKEN by following steps mentioned in Keystone Identity.
API to retrieve existing CoreDNS ClusterAddon object detail.
Create a new JSON spec file with the required additional DNS configuration parameter.
The extra DNS configuration parameter one wants to add should have no indentations. The addon operator adds the correct indentation before adding it under the DNS block in the configmap.
This needs to be inputted as a value for the parameter base64EncAdditionalDnsConfig in the JSON spec file.
You can read more about it here CoreDNS Addon.
Patch the existing CoreDNS ClusterAddon object with the newly created Spec file coredns.json.
Replace the placeholders <DU_FQDN>, <PROJECT_ID> and the <CLUSTER_UUID> with their appropriate values required. The name attribute in the spec must be in the format CLUSTER_UUID-coredns
The CoreDNS version in the above JSON file is currently on 1.7.0. It will be updated along with the pf9-kube version and can be referred from the Support Matrix.
The changes made to the AddOn object will persist across management plane & cluster upgrades.
