How to configure k8s (GKE) to pull images from docker-registry-proxy

I have one global container registry.
I will have many k8s clusters in different cloud providers. For now I use GKE.
I want to have in each k8s cluster local docker registry cache. It reduces the pulling latency and I will be safer if the global container registry has short downtime.

It should work like: when I deploy something on k8s cluster, the k8s starts pulling the image and goes via this proxy. If this proxy has already this image it will serve it quickly, if not it will pull it from global container registry and will serve it.

I tried setup https://hub.docker.com/r/rpardini/docker-registry-proxy
I run it, but I can’t configure k8s cluster to use it as a proxy. In docs I see how to do it, but it is ok when you have your own k8s clusters on servers and you can change dockerd or containerd service files, but I have managed k8s in Google Cloud (GKE), so I can’t easily permanent change files on nodes.

Do you have any ideas how to achieve what I want?

Source: Docker Questions

LEAVE A COMMENT