crictl vs ctr

Last Updated: 2023-12-06

TL;DR: ctr is containerd specific; crictl is kubeneretes related, for any container runtime.

  • ctr is the CLI of containerd.
    • ctr -v for containerd version.
  • crictl is the CLI of CRI (Container Runtime Interface)
    • kubernetes uses crictl
    • for any CRI compliant runtime, e.g. docker, containerd, podman; kubernetes does not care which runtime it is.
    • crictl -v for kubernetes version.
    • config: /etc/crictl.yaml
  • ctr image is namespaced: crictl image list = ctr -n=k8s.io image list

Which one to use?

If you are using Kubernetes, regardless of the actual runtime, use crictl;

If you are using containerd directly, use ctr.