# How to add tolerations to k0smotron workloads

**URL:** https://forums.k8slens.dev/t/how-to-add-tolerations-to-k0smotron-workloads/7131
**Category:** k0smotron
**Created:** [July 17, 2026, 6:07am UTC](https://forums.k8slens.dev/t/how-to-add-tolerations-to-k0smotron-workloads/7131 "2026-07-17T06:07:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![anbo-1](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anbo-1](https://forums.k8slens.dev/u/anbo-1)
#### Post date: [July 17, 2026, 6:07am UTC](https://forums.k8slens.dev/t/how-to-add-tolerations-to-k0smotron-workloads/7131/1 "2026-07-17T06:07:24Z")

</div>

Hello.

I am new to k0smotron. Using k0smotron would solve the problem of how to effectively provision Kubernetes control planes.

As I setup my test k0s cluster that should run k0smotron, I added taints to the nodes and now I can’t figure out a way to add the required tolerations to the k0smotron workloads. I have read the documentation and I have tried throwing both Copilot and Claude at the problem but no luck.

I am trying to use `Cluster.spec.patches` to do it. I get no errors when applying my `Cluster` custom resource but no tolerations are added to the stateful set that is created. Has anyone managed to successfuly add tolerations?

I would probably not have to add custom taints as the management cluster will only run k0smotron and any dependencies. Still, it would be nice to understand how it works.

Cheers,

A

---

<div class="post-metadata">

### Author: ![anbo-1](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anbo-1](https://forums.k8slens.dev/u/anbo-1)
#### Post date: [July 17, 2026, 8:02am UTC](https://forums.k8slens.dev/t/how-to-add-tolerations-to-k0smotron-workloads/7131/2 "2026-07-17T08:02:06Z")

</div>

Turns out i had confused the `app.kubernetes.io/component` with the `component` label at some point of my troubleshooting and retries. It works as documented.

If anyone else is looking for this, here is an example

```auto
apiVersion: k0smotron.io/v1beta2
kind: Cluster
metadata:
  name: k0smotron-test
spec:
  replicas: 1
  service:
    type: NodePort
    apiPort: 30443
    konnectivityPort: 30132
  storage:
    type: nats
  persistence:
    type: emptyDir
  patches:
      - patch:
          content: |
            - op: add
              path: /spec/template/spec/tolerations
              value:
                - operator: "Exists"
          type: json
        target:
          kind: StatefulSet
          component: cluster

```

---

<div class="post-metadata">

### Author: ![crothmann](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/crothmann/32/1544_2.png) [@crothmann](https://forums.k8slens.dev/u/crothmann)
#### Post date: [July 20, 2026, 7:57am UTC](https://forums.k8slens.dev/t/how-to-add-tolerations-to-k0smotron-workloads/7131/3 "2026-07-20T07:57:19Z")

</div>

Hi @anbo-1, welcome to the community – and thanks for circling back to share your fix. Posting the working example is exactly the kind of thing that helps the next person, so it’s much appreciated. Glad you got it working!

---

<div class="post-metadata">

### Author: ![anbo-1](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@anbo-1](https://forums.k8slens.dev/u/anbo-1)
#### Post date: [August 10, 2026, 6:03am UTC](https://forums.k8slens.dev/t/how-to-add-tolerations-to-k0smotron-workloads/7131/4 "2026-08-10T06:03:07Z")

</div>

Here is another extended example, if anyone needs one.

I have a “mothership” cluster consisting of 3 controller+worker nodes, which is why the tolerations are needed. I use PVCs to persist ETCD data. As you can work out form the storage class name, I use TopoLVM as the CSI.

I use both CPLB and NLLB and `k0s` managed `calico` . This combination seems to work quite well.

```auto
apiVersion: k0smotron.io/v1beta2
kind: Cluster
metadata:
  name: test-cluster
  namespace: k0smotron
spec:
  replicas: 3
  version: v1.36.2-k0s.0
  externalAddress: 10.0.10.10 # CPLB VIP
  service:
    type: NodePort
    apiPort: 30443
    konnectivityPort: 30132
  persistence:
    type: pvc
    persistentVolumeClaim:
      spec:
        storageClassName: topolvm-provisioner
        resources:
          requests:
            storage: 5Gi
  storage:
    type: etcd
    etcd:
      persistence:
        storageClass: topolvm-provisioner
  patches:
    - patch:
        content: |
          - op: add
            path: /spec/template/spec/tolerations
            value:
              - operator: "Exists"
        type: json
      target:
        kind: StatefulSet
        component: etcd

```
