Container Service for Kubernetes (ACK) supports the following container runtimes: containerd, Sandboxed-Container, and Docker. This topic compares these runtimes in terms of implementations, limitations, and deployment architectures to help you select the appropriate container runtime for your needs and scenarios.
Comparison in terms of implementations and limits
Feature | containerd | Sandboxed-Container | Docker (discontinued maintenance) |
Cluster types |
|
| All types of ACK clusters |
Kubernetes version | Version 1.20 or later | Kubernetes 1.16 or later | Kubernetes 1.22 and earlier Note We recommend that you migrate to containerd. For more information, see Migrate from Docker to containerd. |
Node type |
| Only ECS Bare Metal Instance families are supported | ECS |
Node operating system | Container Service for Kubernetes provides public images for operating systems such as Alibaba Cloud Linux 3 container-optimized version, ContainerOS, Alibaba Cloud Linux 3, Ubuntu, and Windows. For more information, see Operating systems. |
|
|
Container engine | containerd | containerd | Docker |
Monitoring | Supported | Supported | Supported |
Container log collection | Supported | Manual Injection (Sidecar) | Supported |
Container stdout collection | Supported | Supported | Supported |
RuntimeClass | Not supported | Supported (runV) | Not supported |
Pod scheduling | No configuration is required. | You must add configurations based on the following rules:
| No configuration is required. |
HostNetwork | Supported | Not supported | Supported |
Node data disk | Optional | Required. The data disk must be at least 200 GiB. | Optional |
Network plug-in |
|
|
|
Kube-proxy mode |
|
|
|
Volume plug-in | CSI Plugin (excluding ACK Edge clusters) | CSI Plugin | CSI Plugin |
Container root file system | OverlayFS | OverlayFS with disk quota configuration | OverlayFS |
You cannot deploy both Docker and Sandboxed-Container on the same node. You can create different node pools to deploy Docker runtime nodes and Sandboxed-Container runtime nodes together.
Sandboxed-Container is implemented based on containerd. When you view Sandboxed-Container node information using
kubectl get node
or the node list in the console, the node runtime is displayed as containerd.For more information, see Use CRDs to collect container text logs in Sidecar mode.
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 runtime and Sandboxed-Container runtime use Docker and containerd as their container engines respectively, each with unique command line interfaces for managing images and containers. The following table lists the commonly used commands.
Operation | containerd | Docker | |
crictl (recommended) | ctr | docker | |
Query containers |
|
|
|
Query container details |
|
|
|
Query container logs |
| N/A |
|
Run commands in containers |
| N/A |
|
Attach local stdin, stdout, and stderr to containers |
| N/A |
|
Query resource usage statistics |
| N/A |
|
Create containers |
|
|
|
Start containers |
|
|
|
Stop containers |
| ctr -n k8s.io task pause <container> |
|
Delete containers |
|
|
|
Query images |
|
|
|
Query image details |
| N/A |
|
Pull images |
|
|
|
Push images | N/A |
|
|
Delete images |
|
|
|
Query pods |
| N/A | N/A |
Query pod details |
| N/A | N/A |
Start pods |
| N/A | N/A |
Stop pods |
| N/A | N/A |