Running coredns in HA mode #14555
|
How to run coredns with 2 replcas on a multi-node k3s cluster? I would like to use the k3s managed coredns installation. |
Replies: 1 comment
|
There's no That survives restarts. The deploy controller checksums the manifest file and compares it to the checksum stored on the Addon resource, and skips the apply completely when nothing changed ( You don't need to add anti-affinity either, it's already in there. The deployment ships topologySpreadConstraints on The one thing to watch is upgrades. A k3s upgrade bumps the coredns image in the manifest, the checksum changes and the apply runs, so check If you'd rather have it declarative, drop an empty |
There's no
replicasfield in the packaged manifest at all, so scaling it is enough:That survives restarts. The deploy controller checksums the manifest file and compares it to the checksum stored on the Addon resource, and skips the apply completely when nothing changed (
pkg/deploy/controller.go), so it never touches your replica count.You don't need to add anti-affinity either, it's already in there. The deployment ships topologySpreadConstraints on
kubernetes.io/hostnamewithmaxSkew: 1andwhenUnsatisfiable: DoNotSchedule, so the second pod is forced onto a different node.The one thing to watch is upgrades. A k3s upgrade …