I am trying to purge images from the local kubernetes cache on a set cadence. Before you could setup some volumeMounts on a daemonSet and talk to the docker runtime directly.
The latest runtime is based on containerd but I can't seem to connect using the containerd.sock - when I run ctr image ls
or nerdctl
it shows as nothing running or images on the node. It also returns no errors.
Is there a different method for manually purging from the containerd runtime running on a daemonSet?
Answered in comments, most containerd commands are built for the Docker integration which uses the default containerd namespace (note, nothing to do with Linux namespaces, this is administrative namespacing inside containerd). Most commands have an option to set the ns being used but crictl
is already set up for the CRI namespace that Kubernetes uses (because it's also a CRI client).