You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The configuration file must be a JSON or YAML representation of the parameters
28
-
in this struct. Make sure the Kubelet has read permissions on the file.
28
+
in this struct. Make sure the kubelet has read permissions on the file.
29
29
30
30
Here is an example of what this file might look like:
31
31
```yaml
@@ -38,10 +38,10 @@ evictionHard:
38
38
memory.available: "200Mi"
39
39
```
40
40
41
-
In the example, the Kubelet is configured to serve on IP address 192.168.0.8 and port 20250, pull images in parallel,
41
+
In the example, the kubelet is configured to serve on IP address 192.168.0.8 and port 20250, pull images in parallel,
42
42
and evict Pods when available memory drops below 200Mi. Since only one of the four evictionHard thresholds is configured,
43
43
other evictionHard thresholds are reset to 0 from their built-in defaults.
44
-
All other Kubelet configuration values are left at their built-in defaults, unless overridden
44
+
All other kubelet configuration values are left at their built-in defaults, unless overridden
45
45
by flags. Command line flags which target the same value as a config file will override that value.
46
46
47
47
{{< note >}}
@@ -51,45 +51,45 @@ will be set to zero. In order to provide custom values, you should provide all
51
51
the threshold values respectively.
52
52
{{< /note >}}
53
53
54
-
## Start a Kubelet process configured via the config file
54
+
## Start a kubelet process configured via the config file
55
55
56
56
{{< note >}}
57
57
If you use kubeadm to initialize your cluster, use the kubelet-config while creating your cluster with `kubeadm init`.
58
58
See [configuring kubelet using kubeadm](/docs/setup/production-environment/tools/kubeadm/kubelet-integration/) for details.
59
59
{{< /note >}}
60
60
61
-
Start the Kubelet with the `--config` flag set to the path of the Kubelet's config file.
62
-
The Kubelet will then load its config from this file.
61
+
Start the kubelet with the `--config` flag set to the path of the kubelet's config file.
62
+
The kubelet will then load its config from this file.
63
63
64
64
Note that command line flags which target the same value as a config file will override that value.
65
65
This helps ensure backwards compatibility with the command-line API.
66
66
67
-
Note that relative file paths in the Kubelet config file are resolved relative to the
68
-
location of the Kubelet config file, whereas relative paths in command line flags are resolved
69
-
relative to the Kubelet's current working directory.
67
+
Note that relative file paths in the kubelet config file are resolved relative to the
68
+
location of the kubelet config file, whereas relative paths in command line flags are resolved
69
+
relative to the kubelet's current working directory.
70
70
71
-
Note that some default values differ between command-line flags and the Kubelet config file.
71
+
Note that some default values differ between command-line flags and the kubelet config file.
72
72
If `--config` is provided and the values are not specified via the command line, the
73
73
defaults for the `KubeletConfiguration` version apply.
74
74
In the above example, this version is `kubelet.config.k8s.io/v1beta1`.
75
75
76
-
## Drop-in directory for Kubelet configuration files {#kubelet-conf-d}
76
+
## Drop-in directory for kubelet configuration files {#kubelet-conf-d}
77
77
78
-
As of Kubernetes v1.28.0, the Kubelet has been extended to support a drop-in configuration directory. The location of it can be specified with
78
+
As of Kubernetes v1.28.0, the kubelet has been extended to support a drop-in configuration directory. The location of it can be specified with
79
79
`--config-dir`flag, and it defaults to `""`, or disabled, by default.
80
80
81
81
You can only set `--config-dir` if you set the environment variable `KUBELET_CONFIG_DROPIN_DIR_ALPHA` for the kubelet process (the value of that variable does not matter).
82
82
For Kubernetes v{{< skew currentVersion >}}, the kubelet returns an error if you specify `--config-dir` without that variable set, and startup fails.
83
83
You cannot specify the drop-in configuration directory using the kubelet configuration file; only the CLI argument `--config-dir` can set it.
84
84
85
-
One can use the Kubelet configuration directory in a similar way to the Kubelet config file.
85
+
One can use the kubelet configuration directory in a similar way to the kubelet config file.
86
86
{{< note >}}
87
-
The suffix of a valid Kubelet drop-in configuration file must be `.conf`. For instance: `99-kubelet-address.conf`
87
+
The suffix of a valid kubelet drop-in configuration file must be `.conf`. For instance: `99-kubelet-address.conf`
88
88
{{< /note >}}
89
89
90
-
For instance, you may want a baseline Kubelet configuration for all nodes, but you may want to customize the `address` field. This can be done as follows:
90
+
For instance, you may want a baseline kubelet configuration for all nodes, but you may want to customize the `address` field. This can be done as follows:
91
91
92
-
Main Kubelet configuration file contents:
92
+
Main kubelet configuration file contents:
93
93
```yaml
94
94
apiVersion: kubelet.config.k8s.io/v1beta1
95
95
kind: KubeletConfiguration
@@ -106,10 +106,10 @@ kind: KubeletConfiguration
106
106
address: "192.168.0.8"
107
107
```
108
108
109
-
On startup, the Kubelet merges configuration from:
109
+
On startup, the kubelet merges configuration from:
110
110
111
111
* Command line arguments (lowest precedence).
112
-
* the Kubelet configuration
112
+
* the kubelet configuration
113
113
* Drop-in configuration files, according to sort order.
114
114
* Feature gates specified over the command line (highest precedence).
0 commit comments