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

DO/bare-metal: Change preferred-address-type instead of overriding hostname #186

Closed
klausenbusk opened this issue Apr 12, 2018 · 2 comments

Comments

@klausenbusk
Copy link

klausenbusk commented Apr 12, 2018

Feature Request

On DO/bare-metal we currently override the hostname with the private ip (relevant commit), as the hostname isn't resolvable:

  • Kubelets should register nodes via their private IPv4 address,
    as provided by the metadata service from Digital Ocean
  • By default, Kubelet exec's hostname to determine the name it should
    use when registering with the apiserver. On Digital Ocean, the hostname
    is not routeable by other instances. Digital Ocean does not run an
    internal DNS service.
  • Fixes issue where the apiserver can't reach the worker nodes. This
    prevented kubectl logs and exec commands from working

Feature

It would be more optimal to use the real hostname as it is easier to identify a node by its hostname, rather than its ip.
We can archive that by changing (kube-apiserver):

  --kubelet-preferred-address-types strings                 List of the preferred NodeAddressTypes to use for kubelet connections. (default [Hostname,InternalDNS,InternalIP,ExternalDNS,ExternalIP])

Which change how the apiserver connect to the nodes. I'm currently using --kubelet-preferred-address-types=InternalIP,Hostname,ExternalIP on a regular bootkube DO cluster without any issues.

Tradeoffs

I'm not sure how this will affect AWS/GCE clusters.

@justaugustus
Copy link
Contributor

justaugustus commented Apr 12, 2018

I ran into some woes with this flag in Tectonic, and ended up going with --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname.
I can confirm that works (in Tectonic, at least) across AWS, Azure, and BM.

Check out the convo here: coreos/tectonic-installer#2777.

@dghubble
Copy link
Member

dghubble commented Nov 7, 2018

Note, this broke the Prometheus etcd scrape on DigitalOcean clusters. Fixed by 7de03a1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants