kubeadm-install: modify the note about kubelet cgroup drivers (#9541)
This commit is contained in:
committed by
k8s-ci-robot
parent
a9b1cdb4e9
commit
3270da5099
@@ -234,23 +234,23 @@ kubeadm to tell it what to do.
|
|||||||
|
|
||||||
## Configure cgroup driver used by kubelet on Master Node
|
## Configure cgroup driver used by kubelet on Master Node
|
||||||
|
|
||||||
Make sure that the cgroup driver used by kubelet is the same as the one used by Docker. Verify that your Docker cgroup driver matches the kubelet config:
|
When using Docker, kubeadm will automatically detect the cgroup driver for the kubelet
|
||||||
|
and set it in the `/var/lib/kubelet/kubeadm-flags.env` file during runtime.
|
||||||
|
|
||||||
|
If you are using a different CRI, you have to modify the file
|
||||||
|
`/etc/default/kubelet` with your `cgroup-driver` value, like so:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker info | grep -i cgroup
|
KUBELET_KUBEADM_EXTRA_ARGS=--cgroup-driver=<value>
|
||||||
cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If the Docker cgroup driver and the kubelet config don't match, change the kubelet config to match the Docker cgroup driver. The
|
This file will be used by `kubeadm init` and `kubeadm join` to source extra
|
||||||
flag you need to change is `--cgroup-driver`. If it's already set, you can update like so:
|
user defined arguments for the kubelet.
|
||||||
|
|
||||||
```bash
|
Please mind, that you **only** have to do that if the cgroup driver of your CRI
|
||||||
sed -i "s/cgroup-driver=systemd/cgroup-driver=cgroupfs/g" /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
|
is not `cgroupfs`, because that is the default value in the kubelet already.
|
||||||
```
|
|
||||||
|
|
||||||
Otherwise, you will need to open the systemd file and add the flag to an existing environment line.
|
Restarting the kubelet is required:
|
||||||
|
|
||||||
Then restart kubelet:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|||||||
Reference in New Issue
Block a user