@@ -266,21 +266,25 @@ kubeadm to tell it what to do.
266
266
## Configure cgroup driver used by kubelet on control-plane node
267
267
268
268
When using Docker, kubeadm will automatically detect the cgroup driver for the kubelet
269
- and set it in the ` /var/lib/kubelet/kubeadm-flags.env ` file during runtime.
269
+ and set it in the ` /var/lib/kubelet/config.yaml ` file during runtime.
270
270
271
- If you are using a different CRI, you have to modify the file
272
- ` /etc/default/kubelet ` (` /etc/sysconfig/kubelet ` for CentOS, RHEL, Fedora) with your ` cgroup-driver ` value, like so:
271
+ If you are using a different CRI, you have to modify the file with your ` cgroupDriver ` value, like so:
273
272
274
- ``` bash
275
- KUBELET_EXTRA_ARGS=--cgroup-driver=< value>
273
+ ``` yaml
274
+ apiVersion : kubelet.config.k8s.io/v1beta1
275
+ kind : KubeletConfiguration
276
+ cgroupDriver : <value>
276
277
` ` `
277
278
278
- This file will be used by ` kubeadm init ` and ` kubeadm join ` to source extra
279
- user defined arguments for the kubelet.
280
-
281
279
Please mind, that you **only** have to do that if the cgroup driver of your CRI
282
280
is not ` cgroupfs`, because that is the default value in the kubelet already.
283
281
282
+ {{< note >}}
283
+ Since `--cgroup-driver` flag has been deprecated by kubelet, if you have that in `/var/lib/kubelet/kubeadm-flags.env`
284
+ or `/etc/default/kubelet`(`/etc/sysconfig/kubelet` for RPMs), please remove it and use the KubeletConfiguration instead
285
+ (stored in `/var/lib/kubelet/config.yaml` by default).
286
+ {{< /note >}}
287
+
284
288
Restarting the kubelet is required :
285
289
286
290
` ` ` bash
0 commit comments