/etc/rancher/k3s/config.yaml
Note, /etc/rancher/k3s/config.yaml
not /etc/rancher/k3s/k3s.yaml
! You may have to create the file if it doesn't exist.
K3s doesn't have a dedicated kubelet service. It's integrated into k3s. So it's configured only with the --kubelet-arg
flag to k3s. But you can add Kubelet config directives to your config.yaml
(/etc/rancher/k3s/config.yaml
),
kubelet-arg:
- "kube-reserved=cpu=500m,memory=1Gi,ephemeral-storage=2Gi"
- "system-reserved=cpu=500m, memory=1Gi,ephemeral-storage=2Gi"
- "eviction-hard=memory.available<500Mi,nodefs.available<10%"
Which would look like,
kubelet-arg:
- "eviction-hard=imagefs.available<case>,memory.available<case>,nodefs.available<case>,nodefs.inodesFree<case>"
You can find more information at,