How to Re-deploy CoreDNS Pods Only to the Master Nodes.

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
Copy

After editing:

CoreDNS ClusterAddon
Copy

Add toleration to CoreDNS deployment:

CoreDNS Deployment
Copy

The CoreDNS pods will be re-deploy to master node/s only:

CoreDNS Pods
Copy

Additional Information

The changes made will not persists across cluster upgrade. The new version CoreDNS yaml post upgrade wipes out the taints and toleration.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard