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 support for domain name as advertise address #33

Closed
simonklb opened this issue Feb 19, 2018 · 7 comments
Closed

Add support for domain name as advertise address #33

simonklb opened this issue Feb 19, 2018 · 7 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@simonklb
Copy link

Is there any reason not to allow an API server advertising a domain name rather than just an IP address?

This would be useful when you want to have multiple masters behind a loadbalancer and using the IP address is not suitable, for example in the case of AWS ELB.

Please correct me if I'm wrong here, but from what I can tell the bind address option seems to be the address which the API server is going to listen on while the advertise address is what it is telling other components to use for communication.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 20, 2018
@simonklb
Copy link
Author

Looks like this is being solved, at least partially, by the introduction of ControlPlaneEndpoint. kubernetes/kubernetes#59288

Even more work is being done to support HA masters here: kubernetes/kubernetes#58261

And the progress is being tracked here: kubernetes/kubeadm#261

@SamDecrock
Copy link

SamDecrock commented Oct 5, 2020

Setting ControlPlaneEndpoint does not fix the issue of changing the IP address. If I change the IP address, the API-server will not start. Even when setting ControlPlaneEndpoint

@hi-usui
Copy link

hi-usui commented Oct 9, 2020

Setting ControlPlaneEndpoint does not fix the issue of changing the IP address. If I change the IP address, the API-server will not start. Even when setting ControlPlaneEndpoint

I second this. It is mandatory for me to specify IP address in "advertiseAddress", and when I put a hostname resolved by DNS in controlPlaneEndpoint in kubeadm, it still fails if IP address changes. Anything we can do?

@furkanmustafa
Copy link

furkanmustafa commented Dec 17, 2021

This is an insane requirement. Such a parameter should just accept a hostname as well.

My current workaround is;

  • decide a bogus IP (127.33.22.11) to be used in all nodes, use this for advertising
  • manage an ipvs entry locally, to virtually map that ip to the changing target IP
FAKE_IP=127.33.22.11
REAL_IPS_OR_HOSTNAMES="127.0.0.1 $(dig +short api2)"
ipvsadm -A -t $FAKE_IP:6443
for ip in $REAL_IPS; do
  ipvsadm -a -t $FAKE_IP:6443 -r $ip:6443 -m
done

kube-apiserver \
  --advertise-address ${FAKE_IP} \
  ...

@furkanmustafa
Copy link

Hmm 🤔

E1217 00:46:52.116565    5486 controller.go:227] unable to sync kubernetes service: Endpoints "kubernetes" is invalid: subsets[0].addresses[1].ip: Invalid value: "127.33.22.11": may not be in the loopback range (127.0.0.0/8, ::1/128)

.. better choose an IP address out of this range. the rule above doesn't say anything about multicast ranges.

@mogliang
Copy link

is it still true that apiserver advertise address must be IP? i'm curious that why it cannot be hostname? what difficulity will be face if use hostname?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

7 participants