How do I configure k3s server & agents to use private containerd registry for ALL docker images? #9061
-
Hi all, I'm in an air-gapped environment, followed docs for that. All three nodes are running Ubuntu 20.04 server, and they all have I've copied via Here's my
Now, given this configuration, how do I tell the k3s master node and all agents to pull all images from I've been at this for days now... |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 13 replies
-
You don't. The k3s registries.yaml support only works with the embedded containerd, and you're not using that - you're using the one that was provided by your Linux distribution. You should uninstall containerd from your host, remove the --container-runtime-endpoint flag from k3s, and follow the instructions here: https://docs.k3s.io/installation/private-registry
That is not possible. containerd has an image store. It does not have an image registry that other nodes can pull from. If you want to have a local image registry to mirror or cache images from upstream container registries, you must set that up separate from k3s. There is ongoing work to allow nodes to share images via a peer-to-peer mesh in #8977, but this is not currently possible with vanilla containerd or k3s. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response. I'm not that familiar with Please confirm my understanding on the following points.
If point 1 above is incorrect, then I suppose I need clarification on what After reading about the
The above example would cause k3s to pull Is this a reasonable request? Without it, I have to examine all images that I'll be using in my cluster and ensure that there's a
Appreciate your time and clarification. |
Beta Was this translation helpful? Give feedback.
-
@brandond When are you hoping for #8977 to be generally available? |
Beta Was this translation helpful? Give feedback.
-
@brandond I know you mentioned earlier in this discussion that you are not planning to support global registry rewrites, but this feature would make our lives much easier. We're in an air-gapped environment and, ahead of time, we
where It would be so much easier if we could either have global registry rewrites in the Even with #8977 merged & released, unless I'm reading the new docs incorrectly, we still have to calculate the distinct set of docker registries and generate a I feel like we can't be the only one who'd find this feature useful, especially now with #8977 released. Looking forward to your response. |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for implementing this! @brandond, should update the answer to this discussion to reflect the new feature added in https://github.com/k3s-io/k3s/releases/tag/v1.29.3%2Bk3s1 via PR #9599 from issue #9590? |
Beta Was this translation helpful? Give feedback.
You don't. The k3s registries.yaml support only works with the embedded containerd, and you're not using that - you're using the one that was provided by your Linux distribution.
You should uninstall containerd from your host, remove the --container-runtime-endpoint flag from k3s, and follow the instructions here: https://docs.k3s.io/installation/private-registry
That is not possible. containerd has an image store. It d…