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 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. This topic 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 |
| All types of of ACK clusters |
| None |
Kubernetes version | Kubernetes 1.31 and earlier | 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.31 and earlier | None |
Node type |
|
| ECS Bare Metal | None |
Node operating system |
|
| 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 |
|
|
| None |
Kube-proxy mode |
|
|
| 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 |