ctr and crictl
Developing with Akri, it’s useful to be able to purge container images because, once cached, if changed, these are pulled by tag rather than hash.
The way to enumerate images used by MicroK8s is using either ctr or crictl. I’m unfamiliar with both of these but, here’s what I know:
MicroK8s
MicroK8s leverages both technologies.
Both require sudo
ctr is a sub-command of microk8s and uses --address for the socket
sudo microk8s ctr --address=unix:///var/snap/microk8s/common/run/containerd.sock
NAME:
ctr -
__
_____/ /______
/ ___/ __/ ___/
/ /__/ /_/ /
\___/\__/_/
containerd CLI
And:
crictl is standalone and uses --runtime-endpoint for the socket.
sudo crictl --runtime-endpoint=unix:///var/snap/microk8s/common/run/containerd.sock
NAME:
crictl - client for CRI
Both support images
The latter has ps and rmi