/kind bug
kubeadm version (use kubeadm version
):
v1.12.2
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.
kubeadm init
should accept link-local IPv4 or IPv6 addresses, if they're specified explicitly on the commandline.
kubeadm init --apiserver-advertise-address=169.254.152.255
/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
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.
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.
Most helpful comment
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.