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

Docker Options in the Kind Config #1506

Closed
rrichardson opened this issue Apr 23, 2020 · 4 comments
Closed

Docker Options in the Kind Config #1506

rrichardson opened this issue Apr 23, 2020 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@rrichardson
Copy link

What would you like to be added: A section in the Kind Config that allows for manipulation of Docker options. I have a need to specify the DNS server that is configured in the host, but I could see the need for other features in addition to the volume mounts and port-mapping options that are currently provided.

Why is this needed: For me specifically, I am building a development environment around kind that uses a private docker registry, this registry is accessed via private DNS records through a VPN. This DNS server is configured to be accessed on the host, however, when docker runs, it uses the DHCP provided DNS server as the container host's DNS server, this makes it impossible to resolve the private registry URL.

Changing the Coredns config does not help, since the docker pull in k8s apparently uses the container host's DNS server.

Changing /etc/docker/daemon.json to fix a DNS server also does not work, since Docker uses the DHCP supplied DNS server as the first option, before consulting the fallback.

As far as I can tell, my only solution is to set --dns=my-private-dns-server when kind is started. I would love to hear of some alternate approaches that I can roll into a deployment script.

@rrichardson rrichardson added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 23, 2020
@rrichardson
Copy link
Author

Looking at the implementation and the Providers interface, I now see that passing raw commands straight through might not be the best idea.

The good news, though, is that both Podman and Docker support a --dns flag that allows one to specify the dns server for the container. Perhaps we can yet have a ContainerRuntimeConfig property in the Kind config which contains certain, named settings?

@BenTheElder
Copy link
Member

Hi, we're about to depend on docker embedded DNS in user defined networks to fufill #148 (enabling kind clusters to not break when the host / docker restarts).

We won't be able to implement that in podman trivially, but it won't break the interface, they'll just handle returning node endpoints different.

Once this is implemented your DNS should "just work" ™️

https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge

This is up next after #1471, which has a PR out but we're diagnosing some unusual CI failures.

@BenTheElder
Copy link
Member

#1508 should obviate this, it will use the host DNS via docker's embedded DNS proxy.

@BenTheElder
Copy link
Member

this is a dupe of #284

@BenTheElder BenTheElder added the triage/duplicate Indicates an issue is a duplicate of other open issue. label Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

2 participants