crictl vs ctr
TL;DR: ctr is containerd specific; crictl is kubeneretes related, for any container runtime.
ctris the CLI ofcontainerd, not related to k8s.ctr -vforcontainerdversion.
crictlis 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 -vfor kubernetes version.- config:
/etc/crictl.yaml
- kubernetes uses
ctr imageis 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.
Some functions may be provided by both CLIs:
crictl image = ctr -n=k8s.io images ls