nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

nerdctl system prune --all --force : not clearing the unused images

Open shishir84 opened this issue 1 year ago • 3 comments

Description

Hi Team, We are using AWS EKS cluster v1.25. It is supporting containerd. There is some space issue in all worker nodes and seems the EKS garbage collecter is not working as expected. So we manually tried to delete the unsed images using "crictl rmi --prune". But it not worked. Then we connected with AWS team and they recommended to use "nerdctl". We installed it and ran "nerdctl system prune --all" which again not resolved our space issue. Not sure what is the issue. Need urgent help.

Steps to reproduce the issue

1.yum install nerdctl -y 2. nerdctl system prune --all 3.

Describe the results you received and expected

nothing.

What version of nerdctl are you using?

nerdctl version

Client: Version: OS/Arch: linux/amd64 Git commit: .m buildctl: Version:

Server: containerd: Version: 1.6.6 GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 runc: Version: 1.1.4 GitCommit: 5fd4c4d144137e991c4acebb2146ab1483a97925

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

shishir84 avatar May 16 '23 10:05 shishir84

For kubernetes you may have to specify --namespace=k8s.io

AkihiroSuda avatar May 16 '23 16:05 AkihiroSuda

correct me if my understanding is wrong: we have 10+ namespaces so do we have to run nerdctl system prune --all --namespace=

OR

nerdctl system prune --all --namespace=k8s.io

shishir84 avatar May 17 '23 06:05 shishir84

@shishir84 containerd uses the namespace k8s.io for k8s. so everything you see with kubectl or crictl is in this namespace. the command nerdctl system prune --all --namespace=k8s.io is therefore correct. But probably you need to run it as root or with sudo.

iFrozenPhoenix avatar Nov 26 '23 08:11 iFrozenPhoenix