Core Idea
Three CLIs sit on top of containerd:
ctrspeaks its native API,crictlspeaks the CRI that Kubernetes needs, andnerdctlgives you Docker-compatible commands.
ctr: lightweight containerd CLI for images, containers, content, and namespaces; it has nobuildcommand, but you can import images and mount an imageās rootfs.ctrdoes not implement CRI, so it cannot drive Kubernetes directly; that gap is whycrictlexists.crictl: CRI-facing tool for admins debugging a cluster (ps,pods,logs,inspect);nerdctl: user-friendly, Docker-compatible client wherenerdctl + containerdcan replacedocker + dockerd.
ctr
The ctr command-line tool is a lightweight CLI provided by containerd to interact directly with its API.

COMMANDS:
plugins, plugin Provides information about containerd plugins
version Print the client and server versions
containers, c, container Manage containers
content Manage content
events, event Display containerd events
images, image, i Manage images
leases Manage leases
namespaces, namespace, ns Manage namespaces
pprof Provide golang pprof outputs for containerd
run Run a container
snapshots, snapshot Manage snapshots
tasks, t, task Manage tasks
install Install a new package
oci OCI tools
sandboxes, sandbox, sb, s Manage sandboxes
info Print the server info
deprecations
shim Interact with a shim directly
help, h Shows a list of commands or help for one commandsudo ctr image pull quay.io/quay/busybox:latest- There is noĀ
ctr buildĀ command, but you can import existing images into containerd. - You can inspect the OCI Layout of the image and very conveniently mount an imageās rootfs to a temporary directory on the host - something that is somewhat harder to achieve with Docker.
Info
ctrdoes not implement CRI, so it cannot directly be used with Kubernetes. This is whycrictlis needed for CRI-based interaction in Kubernetes environments.
crictl
critctl is cli tool for CRI compatible container runtimes.
š Most Popular Container Runtimes
cri-tools
Kubernetes CRI-compatible container runtimes
š Kubernetes Architecture > 3 . Container Runtime
crictl ps # List running containers
crictl pods # List running pods
crictl logs # Fetch logs from a container
crictl inspect # Inspect the state of a containerInfo
- Use
crictlif you are a system administrator or developer debugging a Kubernetes cluster or container runtime.- CRI commands are mostly handled internally by Kubernetes and its components like the kubelet. Direct interaction with CRI commands is rare and usually done by developers implementing container runtimes.
Nerdctl
nerdctl: Docker-compatible CLI for contaiNERD | by Akihiro Suda | nttlabs | Medium
nerdctlĀ is a relatively new command-line client for containerd. UnlikeĀ ctr,Ā nerdctlĀ aims to be user-friendly and Docker-compatible. To some extent,Ā nerdctl + containerdĀ can seamlessly replaceĀ docker + dockerd