Containers and images have become the industry standards for software packaging and delivery. Kubernetes has become a standard platform for building, developing, and managing containerized cloud-native applications. An increasing number of enterprises and customers choose to deploy their applications in Container Service for Kubernetes (ACK). ACK supports the following container runtimes: containerd, Docker, and Sandboxed-Container. This topic compares these runtimes in terms of implementations, limits, and deployment architectures. It also compares the commonly used commands provided by Docker Engine and containerd. This helps you select a container runtime based on your business requirements and scenarios.
Comparison in terms of implementations and limits
Feature | Containerd | Docker | Sandboxed-Container | Description |
Cluster types | ACK managed clusters, ACK dedicated clusters, and ACK Edge clusters | All types | ACK managed clusters and ACK dedicated clusters | None |
Kubernetes version | All versions | Kubernetes 1.22 and earlier Note We recommend that you upgrade Docker to containerd for your clusters. For more information, see Change the container runtime from Docker to containerd. | Kubernetes 1.24 and earlier | None |
Node type | The following node types are supported:
| The following node types are supported:
| The following node types are supported: EBM | None |
Node operating system | The following operating systems are supported:
| The following operating systems are supported:
| The following operating systems are supported: Alibaba Cloud Linux Customized Edition |
|
Container engine | Containerd | Docker Engine | Containerd | None |
Monitoring | Supported | Supported | Supported | None |
Log collection | Supported | Supported | Manual configuration of sidecar containers is required to support log collection. | For more information about the sidecar configuration, see Use CRDs to collect container text logs in Sidecar mode. |
Stdout collection | Supported | Supported | Supported | None |
RuntimeClass | Not supported | Not supported | Supported (runV) | None |
Pod scheduling | No configuration is required. | No configuration is required. | You must configure pods based on the following rules:
| None |
HostNetwork | Supported | Supported | Not supported | None |
exec/logs | Supported | Supported | Supported | None |
Node data disk | Optional | Optional | Required (at least 200 GiB) | None |
Network plug-in | The following network plug-ins are supported:
| The following network plug-ins are supported:
| The following network plug-ins are supported:
| None |
Kube-proxy mode | The following kube-proxy modes are supported:
| The following kube-proxy modes are supported:
| The following kube-proxy modes are supported:
| None |
Volume plug-in | CSI (excluding ACK Edge clusters) | CSI | CSI | None |
Container root file system | OverlayFS | OverlayFS | OverlayFS with support for disk quotas | None |
Comparison in terms of deployment architectures
Runtime | Deployment architecture |
Docker |
|
Containerd |
|
Sandboxed-Container V2 |
|
Comparison of the commonly used commands provided by Docker Engine and containerd
Docker uses Docker Engine for container lifecycle management. Sandboxed-Container uses containerd for container lifecycle management. These tools provide different commands that can be used to manage images and containers. The following table describes the commonly used commands provided by Docker Engine and containerd.
Operation | Docker | Containerd | |
docker | crictl (recommended) | ctr | |
Query containers |
|
|
|
Query container details |
|
|
|
Query container logs |
|
| None |
Run commands in containers |
|
| None |
Attach local stdin, stdout, and stderr to containers |
|
| None |
Query resource usage statistics |
|
| None |
Create containers |
|
|
|
Start containers |
|
|
|
Stop containers |
|
| None |
Delete containers |
|
|
|
Query images |
|
|
|
Query image details |
|
| None |
Pull images |
|
|
|
Push images |
| None |
|
Delete images |
|
|
|
Query pods | None |
| None |
Query pod details | None |
| None |
Start pods | None |
| None |
Stop pods | None |
| None |