Skip to content

Commit 717a650

Browse files
authored
Merge pull request #20609 from SataQiu/update-kubeadm-cgroup-docs-20200428
kubeadm: update docs about configuring cgroup driver used by kubelet on control-plane node
2 parents a940d31 + f150906 commit 717a650

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,21 +266,25 @@ kubeadm to tell it what to do.
266266
## Configure cgroup driver used by kubelet on control-plane node
267267

268268
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.
270270

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:
273272

274-
```bash
275-
KUBELET_EXTRA_ARGS=--cgroup-driver=<value>
273+
```yaml
274+
apiVersion: kubelet.config.k8s.io/v1beta1
275+
kind: KubeletConfiguration
276+
cgroupDriver: <value>
276277
```
277278
278-
This file will be used by `kubeadm init` and `kubeadm join` to source extra
279-
user defined arguments for the kubelet.
280-
281279
Please mind, that you **only** have to do that if the cgroup driver of your CRI
282280
is not `cgroupfs`, because that is the default value in the kubelet already.
283281

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+
284288
Restarting the kubelet is required:
285289

286290
```bash

0 commit comments

Comments
 (0)