Microk8s built in registry problems

Two questions:

(1) I’m finding it difficult to manage the microk8s built in registry. What is the recommended way to list images in the registry, and delete the ones I no longer want? Searches yield people’s scripts that use the registry HTTP API via various scripts etc. Seems strange there is not a more well packaged mechanism for doing so?

(2) The HTTP API does not seem to work as expected. Is there a bug which causes it to break whenever an image has multiple tags?

curl 'http://host:32000/v2/oxcar-exe-boob/manifests/latest'
shows the manifest for that repo but

curl 'http://host:32000/v2/oxcar-overly-base/manifests/latest'
yields
{"errors":[{"code":"MANIFEST_UNKNOWN","message":"manifest unknown","detail":{"Name":"oxcar-overly-base","Revision":"sha256:e73504e5256d21ad5ede52f84545ae3fe6d19faed17f4869af4b701cdefe5ad7"}}]}

The logs from the registry pod don’t show anything unusual – they basically report the same error in “log” format.

This is on a microk8s on ubuntu 20.04 installed with snap, yesterday.

snap-id:      EaXqgt1lyCaxKaQCU349mlodBkDCXRcg
tracking:     1.20/stable
refresh-date: 8 days ago, at 06:39 PST

Here is the filesystem in the registry pod, which clearly shows the manifests are there?!

$ find /var/lib/registry/docker/registry/v2/repositories


/var/lib/registry/docker/registry/v2/repositories
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_uploads
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_layers
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_layers/sha256
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_layers/sha256/794bccc82302154fb5830ab569cb1202f7bf8289c514d826f04ce1cb3710bf4c
...
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/revisions
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/revisions/sha256
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/revisions/sha256/e73504e5256d21ad5ede52f84545ae3fe6d19faed17f4869af4b701cdefe5ad7
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/revisions/sha256/e73504e5256d21ad5ede52f84545ae3fe6d19faed17f4869af4b701cdefe5ad7/link
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/dirty-20210205231316-dev_aathan-49041e2d
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/dirty-20210205231316-dev_aathan-49041e2d/current
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/dirty-20210205231316-dev_aathan-49041e2d/current/link
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/dirty-20210205231316-dev_aathan-49041e2d/index
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/dirty-20210205231316-dev_aathan-49041e2d/index/sha256
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/dirty-20210205231316-dev_aathan-49041e2d/index/sha256/e73504e5256d21ad5ede52f84545ae3fe6d19faed17f4869af4b701cdefe5ad7
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/dirty-20210205231316-dev_aathan-49041e2d/index/sha256/e73504e5256d21ad5ede52f84545ae3fe6d19faed17f4869af4b701cdefe5ad7/link
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/latest
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/latest/current
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/latest/current/link
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/latest/index
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/latest/index/sha256
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/latest/index/sha256/e73504e5256d21ad5ede52f84545ae3fe6d19faed17f4869af4b701cdefe5ad7
/var/lib/registry/docker/registry/v2/repositories/oxcar-overly-base/_manifests/tags/latest/index/sha256/e73504e5256d21ad5ede52f84545ae3fe6d19faed17f4869af4b701cdefe5ad7/link
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_uploads
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_layers
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_layers/sha256
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_layers/sha256/794bccc82302154fb5830ab569cb1202f7bf8289c514d826f04ce1cb3710bf4c
...
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/revisions
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/revisions/sha256
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/revisions/sha256/bf2b57da7460b2b01d44d5fd12ce7b82eb657cdf02d1fb80f7e705c7cb60ca1a
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/revisions/sha256/bf2b57da7460b2b01d44d5fd12ce7b82eb657cdf02d1fb80f7e705c7cb60ca1a/link
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/tags
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/tags/latest
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/tags/latest/current
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/tags/latest/current/link
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/tags/latest/index
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/tags/latest/index/sha256
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/tags/latest/index/sha256/bf2b57da7460b2b01d44d5fd12ce7b82eb657cdf02d1fb80f7e705c7cb60ca1a
/var/lib/registry/docker/registry/v2/repositories/oxcar-exe-boob/_manifests/tags/latest/index/sha256/bf2b57da7460b2b01d44d5fd12ce7b82eb657cdf02d1fb80f7e705c7cb60ca1a/link

I’m realizing perhaps these questions are more relevant to the containerd project? I’m just not sure whether these behaviors might be specific to its integration with microk8s…

Hi the built-in registry is the same as the docker registry.
I sometimes use this tool called reg. Which can help you interact with the images in the registry.

1 Like

Thanks for the info.
This is the result removing. How can I remove completely pgnoderedis, not just the tags? Sorry I am a beginner on k8s. Thanks alot
image