From 000382cc16effe1416202882dc39ae4dc0aea35a Mon Sep 17 00:00:00 2001 From: pegasas Date: Mon, 16 Dec 2024 10:36:30 +0800 Subject: [PATCH] Add v3 (2.x) format Containerd configuration --- .../container-runtimes.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/content/en/docs/setup/production-environment/container-runtimes.md b/content/en/docs/setup/production-environment/container-runtimes.md index 08108204d15b8..38ca821fa18b9 100644 --- a/content/en/docs/setup/production-environment/container-runtimes.md +++ b/content/en/docs/setup/production-environment/container-runtimes.md @@ -206,11 +206,20 @@ On Windows the default CRI endpoint is `npipe://./pipe/containerd-containerd`. To use the `systemd` cgroup driver in `/etc/containerd/config.toml` with `runc`, set +In containerd 2.x + +``` +version = 3 +[plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc.options] + SystemdCgroup = true +``` + +In containerd 1.x + ``` -[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] - ... - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] - SystemdCgroup = true +version = 2 +[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] + SystemdCgroup = true ``` The `systemd` cgroup driver is recommended if you use [cgroup v2](/docs/concepts/architecture/cgroups).