Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section on node-taints #204

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/installation/server-roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ k3s-server-1 Ready etcd 5h39m v1.20.4+k3s1
k3s-server-2 Ready control-plane,master 5h39m v1.20.4+k3s1
```

### Prevent workloads on control-plane nodes

By default, server nodes are schedulable and workloads can be launched on them. If you wish to have a dedicated control plane where no user workloads will run, use the `node-taint` parameter. Here is an example of adding a node taint to the configuration file:
Copy link
Member

@brandond brandond Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do, in the HA content. Should we have a dedicated section on supported/handled taints, and link to it more prominently?

By default, server nodes will be schedulable and thus your workloads can get launched on them. If you wish to have a dedicated control plane where no user workloads will run, you can use taints. The `node-taint` parameter will allow you to configure nodes with taints, for example `--node-taint CriticalAddonsOnly=true:NoExecute`.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah expanding this to include all node taints and linking to it in the HA page would be better.

```yaml
# /etc/rancher/k3s/config.yaml
node-taint:
- "CriticalAddonsOnly=true:NoExecute"
```

## Adding Roles To Existing Servers

Roles can be added to existing dedicated nodes by restarting K3s with the disable flags removed. For example ,if you want to add the `control-plane` role to a dedicated `etcd` node, you can remove the `--disable-apiserver --disable-controller-manager --disable-scheduler` flags from the systemd unit or config file, and restart the service.
Expand Down
Loading