Skip to content

Commit

Permalink
Add v3 (2.x) format Containerd configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pegasas committed Dec 18, 2024
1 parent 27e0c56 commit 55f878e
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions content/en/docs/setup/production-environment/container-runtimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```toml
version = 3
[plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc.options]
SystemdCgroup = true
```
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
...
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true

In containerd 1.x

```toml
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).
Expand Down Expand Up @@ -249,9 +258,18 @@ for more details.
In your [containerd config](https://github.com/containerd/containerd/blob/main/docs/cri/config.md) you can overwrite the
sandbox image by setting the following config:

In containerd 2.x

```toml
[plugins.'io.containerd.cri.v1.runtime']
sandbox_image = "registry.k8s.io/pause:3.6"
```

In containerd 1.x

```toml
[plugins."io.containerd.grpc.v1.cri"]
sandbox_image = "registry.k8s.io/pause:3.2"
sandbox_image = "registry.k8s.io/pause:3.6"
```

You might need to restart `containerd` as well once you've updated the config file: `systemctl restart containerd`.
Expand Down

0 comments on commit 55f878e

Please sign in to comment.