Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --registry-mirror support for Containerd Runtime #18361

Open
medyagh opened this issue Mar 11, 2024 · 4 comments
Open

add --registry-mirror support for Containerd Runtime #18361

medyagh opened this issue Mar 11, 2024 · 4 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@medyagh
Copy link
Member

medyagh commented Mar 11, 2024

we have support for registry-mirror for docker runtime but not for containerd:

I did this

$ minikube start --container-runtime=containerd --registry-mirror=http://localhost:5000

and then
$ minikube ssh
$ docker@minikube:~$ ls /etc/containerd/certs.d/
docker.io

According to Gemini to add registry mirror to containerd,


Locate the containerd Config File:
This is usually found at /etc/containerd/config.toml. If it doesn't exist, you'll need to create it.

Modify/Add the plugins."io.containerd.grpc.v1.cri".registry Section:

Version 1.6 and newer:
Make sure this section has plugins."io.containerd.grpc.v1.cri".registry.config_path = "/etc/containerd/certs.d" set.
Create a hosts.toml file within /etc/containerd/certs.d/registry-to-mirror.com, replacing 'registry-to-mirror.com' with the actual registry hostname you want to mirror (e.g., docker.io).
Ini, TOML
server = "https://registry-1.docker.io"  # Original registry (if needed)

[host."https://my-local-mirror.com"]
capabilities = ["pull", "resolve"] 
Use code [with caution.](https://gemini.google.com/faq#coding)


In the code I see we only Start the Docker Container runtime in the provisioner with the registry mirror:
https://github.com/medyagh/minikube/blob/375d9c6cbf6d33a1c20d91c886f7f19c5d8b52c2/pkg/provision/ubuntu.go#L111

@medyagh medyagh added kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Mar 11, 2024
@NeerajNagure
Copy link

NeerajNagure commented Mar 13, 2024

I would like to work on this

@NeerajNagure
Copy link

/assign

@medyagh
Copy link
Member Author

medyagh commented Mar 13, 2024

@NeerajNagure thank you ! look forward to see your contribution

@NeerajNagure
Copy link

@medyagh I have linked a pr that sets containerd runtime options analogous to that of crio runtime.Can I know whether the environment variable CONTAINERD_MINIKUBE_OPTIONS is correct or not? Also whether my approach to add support is correct or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants