Skip to content

Commit

Permalink
labels and taints. docs updated
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Makhov <[email protected]>

labels and taints. docs updated

Signed-off-by: Alexey Makhov <[email protected]>

labels and taints. docs updated. lint fix

Signed-off-by: Alexey Makhov <[email protected]>
  • Loading branch information
makhov committed Dec 13, 2021
1 parent 99657b8 commit 61589ad
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/worker-node-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,29 @@ NAME STATUS ROLES AGE VERSION LABELS
worker0 NotReady <none> 10s v1.20.2-k0s1 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,k0sproject.io/foo=bar,k0sproject.io/other=xyz,kubernetes.io/arch=amd64,kubernetes.io/hostname=worker0,kubernetes.io/os=linux
```

Controller worker nodes are assigned `node.k0sproject.io/role=control-plane` and `node-role.kubernetes.io/control-plane=true` labels:

```shell
$ kubectl get node --show-labels
NAME STATUS ROLES AGE VERSION LABELS
controller0 NotReady control-plane 10s v1.20.2-k0s1 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/hostname=worker0,kubernetes.io/os=linux,node.k0sproject.io/role=control-plane,node-role.kubernetes.io/control-plane=true
```

**Note:** Setting the labels is only effective on the first registration of the node. Changing the labels thereafter has no effect.

## Taints

The `k0s worker` command accepts the `--taints` flag, with which you can make the newly joined worker node the register itself with the given set of taints.

**Note:** Controller nodes running with `--enable-worker` are assigned `node-role.kubernetes.io/master:NoExecute` taint automatically.

```shell
$ kubectl get nodes -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taints
NAME TAINTS
controller0 [map[effect:NoSchedule key:node-role.kubernetes.io/master]]
worker0 <none>
```
## Kubelet args
The `k0s worker` command accepts a generic flag to pass in any set of arguments for kubelet process.
Expand Down

0 comments on commit 61589ad

Please sign in to comment.