i the last days the docker registry on our cluster(3.9) ran out of space. The registry the is backed with glusterfs storage. This happened sometime in the past so i expanded the volume used by the docker registry
This happened again yesterday and I wanted to figure out how to clean up the registry instead of expanding it's size. It got 80G huge!
This is how i done that
# Add the system:image-pruner role: The service account used to run the registry instances requires additional permissions in order to list some resources.
# Add the system:image-pruner cluster role to the service account:
# select the default project
# login as registry service account
# check prune dry run
# run prune
#login again as admin
The Registry size shrank into 4G ^^
I though i share this with you if you got a similar issue. If any body has a better approach or any note on that, I will be happy if you contact me :)