Skip to content

Commit be814ce

Browse files
committed
Describe the options to change kubelet configuration
Signed-off-by: manuelbuil <mbuil@suse.com>
1 parent 4510500 commit be814ce

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/installation/configuration.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,17 @@ This results in a server with:
185185
- Flannel backend set to `none`
186186
- The token set to `secret`
187187
- Debug logging enabled
188+
189+
### Kubelet configuration
190+
191+
:::info Version Gate
192+
The drop-in directory for kubelet configuration files or the config file (options 1 and 2 below) are only available in v1.32 and above. For lower minors, you should use the kubelet args directly (option number 3 below)
193+
:::
194+
195+
Following on from upstream behavior, kubelet configuration can be changed in different ways with a specific [order of precedence](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/#kubelet-configuration-merging-order).
196+
197+
K3s uses a default kubelet configuration which is stored under `/var/lib/rancher/k3s/agent/etc/kubelet.conf.d/00-k3s-defaults.conf`. If you would like to change the default configuration parameters, there are three ways to do so:
198+
199+
1. (Recommended) Drop a config file in `/var/lib/rancher/k3s/agent/etc/kubelet.conf.d/`
200+
2. By using the flag `--kubelet-arg=config=$PATHTOFILE`, where `$PATHTOFILE` is the path to a file that includes kubelet config parameters (e.g. `/etc/rancher/k3s/kubelet.conf`) or the flag `--kubelet-arg=config-dir=$PATHTODIR`, where `$PATHTODIR` is the path to a directory which can include files that contain kubelet config parameters (e.g. `/etc/rancher/k3s/kubelet.conf.d`)
201+
3. By using the flag `--kubelet-arg=$FLAG`, where `$FLAG` is a kubelet configuration parameter (e.g. `image-gc-high-threshold=100`).

0 commit comments

Comments
 (0)