-
Notifications
You must be signed in to change notification settings - Fork 716
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 join uses wrong ip #2418
Comments
hi, trying to figure out what may be the cause for this i noticed:
sadly, the sigs.k8s.io/yaml library that kubeadm and a number of other k8s components use has a bug (or a lack of a feature) where it ignores case sensitivity of fields even if string unmarshaling mode is enabled (kubeadm has warnings, not errors in strict mode). the correct field casing for both Init and JoinConfiguration is i suspect that is the problem here. let me know if it works for you. you may ask why were are not fixing that bug - the response is "its complicated". /kind support |
Ah ok, thanks, I didn't know it was case sensitve. Now that actually kind-of did the trick:
The only thing left is the manifest for the stacked |
glad it worked.
clusterconfiguration is cluster wide. joinconfiguration does not support modifying the local etcd member flags, but if you'd like to see that you can create a separate issue explaining the details of the request. if we support this it becomes difficult to do in the meantime you could use patches, see the --experimental-patches flag for init/join/upgrade. i will close this, but let me know if you have more Qs. /close |
@neolit123: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Works with a patch, thanks for the hint. I'm even a bit grateful it didn't work out of the box (for me), because it forced me to go through a lot of painful lessons ;) |
kubeadm can do a lot in the expense of not being a turn-key solution. |
Is this a BUG REPORT or FEATURE REQUEST?
FEATURE REQUEST
Versions
kubeadm version (use
kubeadm version
): 1.20Environment:
kubectl version
): 1.20uname -a
): Linux pa1 4.15.0-139-generic Network providers should bundle RBAC rules for v1.6 specs if they contact the API Server #143-Ubuntu SMP Tue Mar 16 01:30:17 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxWhat happened?
My machines have two interfaces,
enp0s3
andenp0s8
. The first is providing the default route, the latter is meant for communication across the machines. The latter should also be used for communication in kubernetes.Note: my later deployment will be similar, where the machines will communicate internally in a vlan whereas the default route is provided by another interface. Thus, I don't think my scenario is too artificial.
Additionally, there is a virtual IP for load balancing the control endpoint, within the network of and reachable via
enp0s8
.Using a proper configuration file for
kubeadm init
, it generates all certificates and configurations on the intended, internal ip, i.e. that ofenp0s8
.However, using
kubeadm join
on a second node (supposed to be on the control plane) fails to do so:enp0s3
kube-apiserver.yaml
manifest has the external address as--advertise-address
and also on all probes/etc/kubernetes/*.conf
files use the external addressetcd
, it also advertises the wrong address, bringing theetcd
on my first node into a failed stateWhat you expected to happen?
That I could somehow specify the addresses to be used for
join
, very much as I could do forinit
.Although I would rather expect that
kubeadm join
uses the address of the interface on which the api server endpoint (in my case, that was the virtual ip) can be reached, rather than falling back to the interface having the default route.How to reproduce it (as minimally and precisely as possible)?
kubeadm init
and set itslocalAPIEndpoint.advertiseAddress
to an address which is not on the network interface having the default routekubeadm join
Below is my configuration for joining. There is also a section on
etcd
which I omitted here.The node's internal ip (which should be used) is
192.168.3.12
, the virtual ip where the first master can be found is192.168.3.100
.Anything else we need to know?
The text was updated successfully, but these errors were encountered: