Skip to main content

Microk8s Prune Docker Images

·69 words·1 min
O11y | Cloud
Author
O11y | Cloud
Site Reliability Engineer
Table of Contents

After using microk8s for a while, there may be increased disk usage due to a number of docker images saved in /var dir. You can delete these images using crictl tool. It is not part of microk8s installation, so you need to download first.

Install crictl
#

Download crictl

Connect to containerd
#

sudo ./crictl -r unix:///var/snap/microk8s/common/run/containerd.sock image lis/

Delete unused images
#

sudo ./crictl -r unix:///var/snap/microk8s/common/run/containerd.sock rmi --prune