Skip to content

Commit 04b4e4c

Browse files
authored
Merge pull request #24785 from npu21/setup-zh
update containerd systemd configuration
2 parents 7ffb288 + 384ba18 commit 04b4e4c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

content/zh/docs/setup/production-environment/container-runtimes.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -877,9 +877,16 @@ Start-Service containerd
877877

878878
<!--
879879
```shell
880-
### systemd
881-
882-
To use the `systemd` cgroup driver, set `plugins.cri.systemd_cgroup = true` in `/etc/containerd/config.toml`.
880+
### systemd {#containerd-systemd}
881+
882+
To use the `systemd` cgroup driver in `/etc/containerd/config.toml` with `runc`, set
883+
884+
```
885+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
886+
...
887+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
888+
SystemdCgroup = true
889+
```
883890
When using kubeadm, manually configure the
884891
[cgroup driver for kubelet](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-master-node)
885892
@@ -888,12 +895,14 @@ When using kubeadm, manually configure the
888895
Refer to the [Frakti QuickStart guide](https://github.com/kubernetes/frakti#quickstart) for more information.
889896
```
890897
-->
891-
### systemd
898+
### systemd {#containerd-systemd}
892899

893900
使用 `systemd` cgroup 驱动,在 `/etc/containerd/config.toml` 中设置
894901
```
895-
[plugins.cri]
896-
systemd_cgroup = true
902+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
903+
...
904+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
905+
SystemdCgroup = true
897906
```
898907
当使用 kubeadm 时,请手动配置
899908
[kubelet 的 cgroup 驱动](/zh/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-master-node)

0 commit comments

Comments
 (0)