Set Kubelet parameters via a config file
Providing parameters via a config file is the recommended approach because it simplifies node deployment and configuration management.
The subset of the Kubelet’s configuration that can be configured via a file is defined by the KubeletConfiguration struct.
Here is an example of what this file might look like:
In the example, the Kubelet is configured to serve on IP address 192.168.0.8 and port 20250, pull images in parallel, and evict Pods when available memory drops below 200Mi. All other Kubelet configuration values are left at their built-in defaults, unless overridden by flags. Command line flags which target the same value as a config file will override that value.
Start the Kubelet with the flag set to the path of the Kubelet’s config file. The Kubelet will then load its config from this file.
Note that command line flags which target the same value as a config file will override that value. This helps ensure backwards compatibility with the command-line API.
Note that some default values differ between command-line flags and the Kubelet config file. If is provided and the values are not specified via the command line, the defaults for the version apply. In the above example, this version is .