2020-12-18 16:34:24 +08:00
# containerd
2020-11-30 16:22:49 +08:00
[containerd] An industry-standard container runtime with an emphasis on simplicity, robustness and portability
Kubespray supports basic functionality for using containerd as the default container runtime in a cluster.
_To use the containerd container runtime set the following variables:_
2021-04-29 20:20:50 +08:00
## k8s_cluster.yml
2020-11-30 16:22:49 +08:00
2022-01-05 16:32:33 +08:00
When kube_node contains etcd, you define your etcd cluster to be as well schedulable for Kubernetes workloads. Thus containerd and dockerd can not run at same time, must be set to bellow for running etcd cluster with only containerd.
2022-01-05 06:29:20 +08:00
2020-11-30 16:22:49 +08:00
```yaml
container_manager: containerd
```
2021-01-11 22:39:08 +08:00
## etcd.yml
```yaml
etcd_deployment_type: host
```
2020-11-30 16:22:49 +08:00
## Containerd config
Example: define registry mirror for docker hub
```yaml
2021-04-02 14:20:11 +08:00
containerd_registries:
"docker.io":
- "https://mirror.gcr.io"
- "https://registry-1.docker.io"
2020-11-30 16:22:49 +08:00
```
2022-01-12 07:35:24 +08:00
`containerd_registries` is ignored for pulling images when `image_command_tool=nerdctl`
(the default for `container_manager=containerd` ). Use `crictl` instead, it supports
`containerd_registries` but lacks proper multi-arch support (see
[#8375 ](https://github.com/kubernetes-sigs/kubespray/issues/8375 )):
```yaml
image_command_tool: crictl
```
2020-11-30 16:22:49 +08:00
[containerd]: https://containerd.io/