-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support for Headless hostPort services #315
Comments
#324 was released in https://github.com/kubernetes-incubator/external-dns/releases/tag/v0.4.8, but we still need documentation for it describing how it's used (with FQDN template). |
Just tested the new feature with v0.4.8 --- here what needs to be done to try it out:
The resulting DNS entries will look like (assuming the pod's hostname was set to "pod-1"):
The DNS entries will point to the private IP of the node and the pod can be accessed via the exposed |
I wasn't sure where to add the docs, and was waiting for some comments on that, thanks for documenting it. Is there anything else we need to add? |
@Arttii could you add a complete tutorial in the tutorials folder on how to use headless hostPort services? |
Yes sure, I'm out of the offcie currently, but I think I have some time to work on it tomorrow. Should be fairly straightforward. |
@Arttii thanks! 😄 |
There's something I'm really not understanding here. I got this up and running on my GKE cluster, and now I can have a headless service expose a DNS entry: Except the IP address is the node (VM's) IP address, not the pod's. And this is a ClusterIP service which does not expose a port on the node. If instead I switch to a nodePort service, external-DNS doesn't recognise it, but now I have a connected port on the node. I can probably get around this by having two services, one for the external-dns registration, and one for the nodePort. This is extremely hacky and doesn't appear at all to be the desired functionality. What am I missing here? |
@akmistry I was wondering if you could explain what your desired functionality was? Do you want the NodeIPs or PodIPs exposed for your NodePort service? |
@hjacobs But NodePort services are what is effectively being supported here because the node's IP address is being advertised. I think NodePort->NodeIP and headless->PodIP is most intuitive. @Arttii Headless services have their PodIPs (if clusterIP: None) registered under the service's name in kube-dns. I would expect the same in external-dns. I'm not interested in NodePort support. Also, according to https://kubernetes.io/docs/concepts/configuration/overview/: |
It would be really convenient if I could push an A record pointing at the public IP address of each pod in an headless service. This way I can connect directly to the service.
Bonus points for publishing a SRV record with the node external IP and the hostPort value.
The text was updated successfully, but these errors were encountered: