loud-eve-73457
02/23/2023, 2:38 AMregistries.yaml
and try to put some things like below to make the kubernetes registry point to own harbor proxy cache, but it doesn’t work and the containerd still tries to pull image from the original one. What’s wrong with my configuration? thanks.mirrors:
<http://registry.k8s.io|registry.k8s.io>:
endpoint:
- "<https://harbor.in.xxx.tech/registry.k8s.io>"
configs:
"<http://registry.k8s.io|registry.k8s.io>":
auth:
username: robot$xxx
password: xxxxxxxxxxx
config.toml
generated for containerd, and there existed an entry for <http://registry.k8s.io|registry.k8s.io>
creamy-pencil-82913
02/23/2023, 3:03 AMendpoint:
- "<https://harbor.in.xxx.tech/registry.k8s.io>"
This is not going to work<http://harbor.in|harbor.in>.xxx.tech
you can’t just put that in the base path of the URL. The registry API is still actually at <https://harbor.in.xxx.tech/v2>
- you need to look at applying rewrites to your mirror config. This is covered in the docs.loud-eve-73457
02/23/2023, 3:21 AM<http://registry.k8s.io|registry.k8s.io>:
endpoint:
- "<https://harbor.in.xxx.tech>"
rewrite:
"^<http://registry.k8s.io/(.*)|registry.k8s.io/(.*)>": "<http://registry.k8s.io/$1|registry.k8s.io/$1>"
<http://registry.k8s.io|registry.k8s.io>:
endpoint:
- "<https://harbor.in.xxx.tech>"
rewrite:
"^(.*)": "<http://registry.k8s.io/$1|registry.k8s.io/$1>"
rewrite
rule cannot fit for the override one and the origin one at the same time. How should I do. thanks
<http://docker.io|docker.io>:
endpoint
- "<https://harbor.in.xxx.tech>"
- "<https://hub.docker.com>"
rewrite:
"^(.*)": "<http://docker.io/$1|docker.io/$1>"
creamy-pencil-82913
02/27/2023, 3:58 AMloud-eve-73457
02/27/2023, 6:51 AM<http://docker.io|docker.io>
to use my local registry as backend, thus when I pull kubectl run busybox
, it goes to local_registry/library/busybox
to find the image. Is there any way to make it fallback to another backend if my local registry failed with out change the front end url, i.e. kubectl run busybox
@creamy-pencil-82913creamy-pencil-82913
02/27/2023, 9:22 AMloud-eve-73457
02/27/2023, 9:41 AM<http://docker.io|docker.io>:
endpoint:
- "<https://harbor.in.aitopia.tech>"
rewrite:
"^(.*)": "<http://docker.io/$1|docker.io/$1>"
what would it behave if the endpoint list in the endpoint failed. It will fallback to registry-1.docker.io the default one to pull the image, or it will failed pulling. Under my test, it’s the second one, it failed. What should I do to make it behave as the first one. Great thanks and there is few documentation about the configuration of rke2 registry. @creamy-pencil-82913