-3

Is it possible to get a list of available images from Kubernetes container registry? Preferably by REST API.

Brivvirs
  • 2,461
  • 3
  • 18
  • 31
  • As far as I know, Kubernetes doesn't have a docker registry. You can install a local docker registry as a Kubernetes pod or on a separate environment or machine. After installing the docker registry, you can get the list of available repositories using this api endpoint: https://docs.docker.com/registry/spec/api/#listing-repositories – Ali_MM Mar 30 '21 at 23:19
  • can you be more precise? do you have a registry running on k8s or do you want to get the list of images that are used in your k8s cluster? (not in the registry) – Vad1mo Jun 13 '21 at 06:20

1 Answers1

2

The "standard" k8s.gcr.io registry used honors docker's Registry API

curl -H 'accept: application/vnd.docker.distribution.manifest.v2+json' \
  https://k8s.gcr.io/v2/kube-apiserver/tags/list \
  | jq .tags
mdaniel
  • 31,240
  • 5
  • 55
  • 58