-
Notifications
You must be signed in to change notification settings - Fork 57
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
DNS Hostnames for LoadBalancer services #206
Comments
How it will look like?
which hostname should go there? it will not work in all platforms if we set the container names, .... |
Yeah.. I don't have a full design for it. My current thinking is something like "we bring our own DNS server, you set which zone it should serve on, it's your responsibility to configure your system DNS resolver to use it". Maybe it would be a better fit to do this in a separate controller/project instead, but the current API doesn't really lean towards aggregating |
I mean, I'm open to do it, but it seems it requires a bit of thinking, we can easily set the hostname on that fields, but if users need to do a lot of manual work on their systems for it to work is going to be complex ... not thinking about desktop docker, wsl2, mac, windows, ... |
Maybe Such a solution would delegate the problem of determining the host name to the script. And it would keep |
That sort of thing is a big source of security issues and bugs though. What's the use case where we need to set hostname on sevices that can't be tested either via the IP or via out of band DNS <> IP? |
Here is my use case. I'm new to Kind, so I could be doing this all wrong.
|
cloud-provider-kind goal is to emulate real deployments, so I want to think about this problem the same way as someone has to solve it in GKE or EKS or AKS, ... how people is solving this problem today on those environments? |
There are non-standard and complex features to obtain certificates (eg GKE manager certs) or sometimes cert manager is used. I don't think hostname is generally assigned by the LB at the Kubernetes level. Your script only needs to run on restart right? You could configure this to run after docker starts in your host's init. Otherwise I'd say a separate "controller" could watch the LB IPs, but I don't think that's even necessary since IPs don't change arbitrarily, only on restart |
I think you have a very fair point. I'm not talking from experience, but after some research I think people either handle this manually (generally speaking IPs are not expected to change), or they use something like https://github.com/kubernetes-sigs/external-dns. ExternalDNS sounds like something I could use. |
FWIW The Kubernetes project itself currently uses static IPs + semi-manually configured DNS entries (automated reconcile, manual config file: https://github.com/kubernetes/k8s.io/tree/main/dns). Static-IPs is kind of mess for docker/podman/docker desktop/nerdctl/ ..., so far we've avoided this due to not being able to give good portability / guarantees around it. They are typically "static" until restart though.
Please let us know here if that works for you, I do think we want to offer answers, just not sure what the best answer is :-) |
in addition, if you find something that does not exist in Kubernetes today that will simplify this problem , that is also other venue we can explore and add that functionality |
In my use case, I have two kind clusters:
I have a minio + Ingress on the workload cluster, but knowing the LB IP from within the management cluster is a hassle. Would be great to have an internal DNS name, similar to the already working control-plane hostname: |
That hostname is provided by docker, for the container name, if and only if you're on the This isn't necessarily provided by other runtimes though (podman, nerdctl/containerd) and it won't work from your host. |
Right. With kind running outside of the docker network, none of my ideas really worked out:
|
Currently, cloud-provider-kind will only provision IP addresses for LoadBalancer services. It would be nice if it also supported DNS hostnames (probably optionally, since it would require clients to configure DNS resolution separately).
The text was updated successfully, but these errors were encountered: