Managed Kubernetes
Latest
Frequently Asked Questions
Solutions
How Tos
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How to Re-deploy CoreDNS Pods Only to the Master Nodes.
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
Re-deploy CoreDNS pods only to the master nodes as part of performance improvement. Process to achieve this by editing Clusteraddon and by using taints.
Environment
- Platform9 Managed Kubernetes - 5.4.0 and Higher.
Procedure
To implement this via the taint and toleration method, the steps to be performed is to set watch flag to false in CoreDNS clusteraddon object and manually edit the CoreDNS deployment to add taints.
CoreDNS ClusterAddon
xxxxxxxxxxEdit watch flag to false in clusteraddon of CoreDNS: # kubectl edit clusteraddons -n default 91bc678c-7da5-41d0-be51-c295cd0a6453-corednsAfter editing:
CoreDNS ClusterAddon
xxxxxxxxxx# kubectl describe clusteraddons -n default 91bc678c-7da5-41d0-be51-c295cd0a6453-corednsName: 91bc678c-7da5-41d0-be51-c295cd0a6453-corednsNamespace: defaultLabels: sunpike.pf9.io/cluster=91bc678c-7da5-41d0-be51-c295cd0a6453 type=corednsAnnotations: <none>API Version: sunpike.platform9.com/v1alpha2Kind: ClusterAddon Spec: Cluster ID: 91bc678c-7da5-41d0-be51-c295cd0a6453 Override: Params: Name: dnsMemoryLimit Value: 170Mi Name: dnsDomain Value: cluster.local Type: coredns Version: 1.8.0 Watch: false < ---------------------Add toleration to CoreDNS deployment:
CoreDNS Deployment
xxxxxxxxxxnodeSelector: node-role.kubernetes.io/master: "" <--------- Add priorityClassName: system-cluster-critical restartPolicy: Always schedulerName: default-scheduler securityContext: {} serviceAccount: coredns serviceAccountName: coredns terminationGracePeriodSeconds: 30 tolerations: - key: CriticalAddonsOnly operator: Exists - effect: NoSchedule <--------- Add key: node-role.kubernetes.io/master <--------- Add operator: Equal <--------- Add value: "true" <--------- AddThe CoreDNS pods will be re-deploy to master node/s only:
CoreDNS Pods
# k get pods -A -owide | grep corekube-system coredns-84fffcdbd6-52p4j 1/1 Running 0 10s 10.20.73.133 10.128.147.114 <none> <none>kube-system coredns-84fffcdbd6-shng9 1/1 Running 0 10s 10.20.73.134 10.128.147.114 <none> <none>kube-system coredns-88d66bcc7-rlxqr 1/1 Terminating 0 35m 10.20.165.196 10.128.147.204 <none> <none>Additional Information
The changes made will not persists across cluster upgrade. The new version CoreDNS yaml post upgrade wipes out the taints and toleration.
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message