This message was deleted.
# k3s
a
This message was deleted.
b
antiaffinity
and if you are deploying a chart that isn't yours, it's a gamble on whether the values expose the option. you'll have to manually inspect the values and see.
b
So it depends on what you want to run on control-plane nodes. in K3s the control-plane programs run as part of the k3s binary not as part of kubernetes deployment - I guess I would just recommend the taints referenced in the rke2 docs: https://docs.rke2.io/install/ha#2a-optional-consider-server-node-taints that should cover everything running in kube-system by default at least
w
Seems to work well enough - thanks!
b
btw, if you are using kustomize, this can be useful
Copy code
patchesJson6902:
  - target:
      group: apps
      version: v1
      kind: Deployment
      name: ".*"
    patch: |-
      - op: add
        path: /spec/template/spec/nodeSelector
        value:
          node-role.kubernetes.io/control-plane: "true"
  - target:
      group: apps
      version: v1
      kind: StatefulSet
      name: ".*"
    patch: |-
      - op: add
        path: /spec/template/spec/nodeSelector
        value:
          node-role.kubernetes.io/control-plane: "true"
It's heavy handed and doesn't solve all cases, e.g. operator configs for anything they might launch, but just another step. I started thinking more about what you are doing and see how I could apply this at work for on demand clusters. It's certainly an interesting case if you are doing something like combining it with spot instances
n