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

kubeadm init refuses to use link-local unicast IPs as --apiserver-advertise-address #1272

Closed
danderson opened this issue Nov 23, 2018 · 3 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@danderson
Copy link

Is this a BUG REPORT or FEATURE REQUEST?

/kind bug

Versions

kubeadm version (use kubeadm version):

v1.12.2

What happened?

I'm setting up a VM-based test harness that uses kubeadm to set up a small k8s cluster. The VMs are configured to set up IPv4 link-local addresses and use multicast DNS to find each other. Because of the way the VMs are set up, I have to override --apiserver-advertise-address to make k8s use the LAN interface for node communication, because it's not the default interface.

Unfortunately, kubeadm checks .IsGlobalUnicast() on the passed in address, so the link-local IPv4 address is rejected even though it's a valid way to set up a small cluster.

What you expected to happen?

kubeadm init should accept link-local IPv4 or IPv6 addresses, if they're specified explicitly on the commandline.

How to reproduce it (as minimally and precisely as possible)?

kubeadm init --apiserver-advertise-address=169.254.152.255

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 23, 2018
@neolit123
Copy link
Member

/remove-kind bug
/kind feature
/sig node
/priority backlog
/assign @kad
cc @rosti

@danderson
this is by design. our validation is only a sanity check, because the kubelet also ignores address in the host interface that are not global unicast:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/net/interface.go#L305-L308

loopbacks are also overriden:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/net/interface.go#L408

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. sig/node Categorizes an issue or PR as relevant to SIG Node. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed kind/bug Categorizes issue or PR as related to a bug. labels Nov 23, 2018
@timothysc
Copy link
Member

So enabling link-local addresses can be problematic in most use cases. We purposefully disabled due to a couple of other failure conditions, and this use case is non-standard IMO.

@timothysc timothysc added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 26, 2018
@timothysc
Copy link
Member

Given the lack of justification, and overall agreement that this can be more problematic for most users we are closing.

If your use case can be simplified, generalized, or easily patched feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

No branches or pull requests

5 participants