CoreDNS Addon
Introduction
The CoreDNS add-on is the default open-source Platform9 managed DNS service solution we use to manage external domain names, automatically discover and link services within the cluster, and it provides domain name resolution for those services. Additionally, it connects a wide variety of supplemental plug-ins to provide increased granular control, so only the needed plug-ins are utilized to ensure resolution is fast, flexible, and efficient. It functions without any specialized installation, configuration, or modification and is available by default for all users,
Settings
CoreDNS is enabled by default for all clusters. To access and modify the settings, go to the Infrastructure page, check the radio button next to the cluster you wish to modify, then click edit.

This will open a new page where the changes can be reviewed or applied. Scroll down the page to the Cluster Add-ons area to enable the CoreDNS Configuration section.

Once enabled, set up any or all of the configuration options:
- DNS Memory Limit - Every DNS query require a certain amount of CoreDNS pod memory. The method to determine an optimal setting is to theorize this requirement, using this formula:
MB required = (Pods + Services) / 1000 + 54
. More info about this option can be found on the CoreDNS GitHub Page. - DNS Domain - This setting is used to identify and resolve the DNS domain name users specify.
- Base64 Encoding Additional DNS Configuration - The CoreDNS configuration allows for the addition of external DNS settings. More info can be found here.

Also, more CoreDNS functionality is available via the use of multiple plugins. Because it is itself a flexible addon, it not only allows for the use of unique configurations, but also affords the user the ability to write their own plugins.
YAML Specifications
apiVersion sunpike.platform9.com/v1alpha2
kind ClusterAddon
metadata
labels
sunpike.pf9.io/cluster'<clsuuid>'
type coredns
name <clsuuid>-coredns
namespace default
spec
clusterID'<clsuuid>'
override
params
name dnsMemoryLimit
value 170Mi
name dnsDomain
value cluster.local
name base64EncAdditionalDnsConfig #Optional
value"<base 64 encoded additional dns config>"
# If the entire dns config is specified additional dns config
# and dns domain are not used
name base64EncEntireDnsConfig #Optional
value"<base 64 encoded entire dns config>"
type coredns
version1.8.0
watchtrue
DNS Autoscaler
The DNS Autoscaler is a new addon object for CoreDNS for v5.4 which allows Platform9 to configure a reliable method to scale CoreDNS replica nodes. It enables these additional replicas based on the current number of cores / nodes within the cluster as defined in the ConfigMap. It is not enabled by default on new clusters, but can be easily added by our support team if needed or required. This addon is continually updated along with the pf9-kube
version and can be referenced in the Support Matrix article.
The addon does not scale replicas based on load, but on the cluster size for the DNS service within the Kubernetes clusters.
YAML Specifications
apiVersion sunpike.platform9.com/v1alpha2
kind ClusterAddon
metadata
labels
sunpike.pf9.io/cluster'<clsuuid>'
type dns-autoscaler
name <clsuuid>-dns-autoscaler
namespace default
spec
clusterID'<clsuuid>'
# All override params are optional and if not specified will default to the values
# listed here
override
params
name CoresPerReplica
value"256"
name NodesPerReplica
value"16"
name MinReplicas
value"1"
name MaxReplicas
value"10"
# How often should the scaler check the size of the cluster to decide if the
# coredns replica count should be scaled, keeping it too low will make it responsive
# but we don't want this extra load on the apiserver, hence 5 mins is the default
name PollPeriodSecs
value"300"
type dns-autoscaler
version1.8.1
watchtrue
Additionally, information can be base64 encoded and used as an override parameter.
override
params
name base64EncEntireDnsConfig
value"Ljo1MzAwIHsKICAgIGVycm9ycwogICAgaGVhbHRoIHsKICAgICAgICBsYW1lZHVjayA1cwogICAgfQogICAgcmVhZHkKICAgIGt1YmVybmV0ZXMgY2x1c3Rlci5sb2NhbCBpbi1hZGRyLmFycGEgaXA2LmFycGEgewogICAgICAgIHBvZHMgaW5zZWN1cmUKICAgICAgICBmYWxsdGhyb3VnaCBpbi1hZGRyLmFycGEgaXA2LmFycGEKICAgICAgICB0dGwgMzAKICAgIH0KICAgIHByb21ldGhldXMgOjkxNTMKICAgIGZvcndhcmQgLiAvZXRjL3Jlc29sdi5jb25mIHsKICAgICAgICBtYXhfY29uY3VycmVudCAxMDAwCiAgICB9CmNhY2hlIDMwCiAgICBsb29wCiAgICByZWxvYWQKICAgIGxvYWRiYWxhbmNlCn0K"
Conclusion
Should you encounter any difficulties adopting or deploying the information noted above, our talented and responsive support team is available 24/7/365 to provide any additional assistance needed.