Skip to content
Discussion options

You must be logged in to vote

There's no replicas field in the packaged manifest at all, so scaling it is enough:

kubectl -n kube-system scale deployment coredns --replicas=2

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/hostname with maxSkew: 1 and whenUnsatisfiable: DoNotSchedule, so the second pod is forced onto a different node.

The one thing to watch is upgrades. A k3s upgrade …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by safderali5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants