Resilient kubelet configuration
| This page discusses third-party software sources not officially affiliated with or endorsed by the Fedora Project. Use them at your own discretion. Fedora recommends the use of free and open source software and avoidance of software encumbered by patents. | 
kubelet overview
The kubeletkubeletkubernetes1.30kubeletkubeletkubelet
In more recent versions of the kubelet
The legacy non-versioned rpms use, by default, flags to configure the kubelet
With both versioned and non-versioned rpms, all files, including systemd related files, can be erased during version updates (e.g. kubernetes1.29 to kubernetes1.30 - minor version updates). If these files are modified by the user then there is risk that useful or important changes can be lost. Systemd provides options that help safeguard against loss of node-specific configurations.
Systemd configuration recommendations
Flags for the kubelet
The kubernetes rpm (e.g kubernetes1.30 for version 1.30) installs the default kubelet
/usr/lib/systemd/system/kubelet.serviceThe kubernetes-kubeadm rpm installs an overriding kubelet
/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.confWe strongly recommend to not modify either file as any changes could be lost during an update.
As documented by the Kubernetes team (https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/kubelet-integration/#the-kubelet-drop-in-file-for-systemd), create the following directory for user managed, system-level systemd kubelet
$ sudo mkdir -p /etc/systemd/system/kubelet.service.d/Then create a unit file (.conf
This file is not managed by the system package manager and will be unchanged by kubernetes version updates. Be sure to have software version control and/or a backup plan in place to avoid loss during a Fedora system upgrade or crash.
Configuration file recommendations
All versioned kubernetes rpms use a kubelet
# default configuration file
$ /var/lib/kubelet/config.yamlThis file is not managed by rpm so will persist across kubernetes upgrades.
Drop-in configuration file
Kubernetes 1.30 and newer have a drop-in configuration file option that is not enabled by default.
In a systemd file define a path using the --config-dir
# define configdir
--config-dir=/etc/kubernetes/kubelet.conf.dSee the online documentation for current information including an option to enable this feature for v1.28 or v1.29.
Configuration file merge order
As the kubelet
- 
Feature gates specified over the command line (lowest precedence). 
- 
The kubelet configuration. 
- 
Drop-in configuration files, according to sort order. 
- 
Command line arguments excluding feature gates (highest precedence). 
Want to help? Learn how to contribute to Fedora Docs ›