-
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
Using ip:port in kubeadm join command to render kubelet config and kube-proxy on node please #664
Comments
/assign @liztio |
See #598. Clearly a bug, not a feature request, based on logging output by kubeadm. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
/assign @rdodev could you verify that this still exists for 1.12 and assign 1.13 milestone if you can repro given all our shuffling /kind bug |
#598 has easy repro steps |
Finally getting around this. /lifecycle active |
@timothysc was unable to replicate in 1.12
Run 'kubectl get nodes' on the master to see this node join the cluster.
|
@rdodev I reproduced it last week on 1.12. Why do you think kubeadm is actually connecting to |
@jethrogb firewall rules. In the repro steps you linked they're forcing via iptables. |
|
|
On the master:
|
@jethrogb don't know what to tell you. This is a mint fresh install on fresh infra.
|
@rdodev That |
Folks, the interpretation of the API server endpoint command line argument during join is misleading. In truth, this is used only during bootstrap and for nothing else. And even so, it's used only during token based discovery. It will be ignored (without even a single warning) with kubeconfig based discovery. So there are really a couple of problems here:
|
+1
IMO we shouldn't overwrite this on join time, maybe we can have a command to update the Api Server Endpoint on |
I wasn't clear actually. By "modify the config" I meant to actually add a new field somewhere in the next config format (possibly What we can certainly do in this cycle is to add a command line switch for the bootstrap token discovery API server and deprecate supplying it as an anonymous argument. @neolit123 @fabriziopandini WDYT? |
Tim and Fabrizio sort of disagreed. it's nothing but trouble. |
@neolit123 even if we don't go on the command line switch track, we can actually do a better job in documenting the arg, both in the inline tool help ( |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
reading trough the whole ticket there are multiple issues that are either misunderstandings, covered elsewhere or not documented. the original issue:the original issue talks about:
i do not understand this problem, so if you feel this is still viable to 1.13 (1.12 is not supported anymore) please log a new ticket with full details and examples. the misleading anonymous join argument:this was tracked in here: we were planning to switch to a named argument for discovery e.g. transitioning from single control-plane to HA:was tracked here: a PR for this topic just merged in our docs: the TL;DR is that if you modify the address of the api-server on a control-plane node after the cluster is created you need to regenerate certificates and patch cluster-objects. to better transition to HA use DNS names. if there is something else at play, please create clean tickets with full details so that the maintainers can grasp the problem. |
@neolit123 #598 got merged into this but it's not clear to me if it is resolved. |
@neolit123 I have a Kubernetes control plane node running inside a Docker container via https://github.com/kubernetes-sigs/kind. The api server is exposed on the Docker host via port forwarding. I need to add a worker node in the Docker host's network to the cluster. Obviously the IP address and hostname of the container running the kubelet and Docker host where the API is exposed via port forwarding differ, so we run into the problems being described in this issue. For one thing, when someone reaches the master node's API via the forwarded port on the Docker host, the IP address does not match the certificate. This is easy to fix: we can just add the Docker host's IP to certificateSANs when using kubeadm to deploy the cluster. The other problem (which is harder to solve) is that when we try to join the worker node to the cluster we need to consistently override the API endpoint being used to reach the master node (i.e. it should use the Docker host's IP everywhere, and not the internal IP address of the Docker container, to which it has no access). As far as I understand there's still no way to do this, or at least I can't see one from looking at the flags for |
this seems like an unsupported scenario by kind.
the OP of this issue was confusing and i don't think it's related to your problem. |
@neolit123 The important question is whether it's a supported scenario by kubeadm; kind just wraps kubeadm and a container runtime. I can think of a number of other scenarios that don't involve kind where a kubernetes control plane node's API port is forwarded somewhere else, and the worker node must be registered to it in a network where the original control plane address is not accessible. E.g. using an SSH tunnel, or a TCP reverse proxy. |
that endpoint is then written on a worker node's kubelet.conf file that is used to communicate to the API server you can omit the positional argument completely from
this is seems like a problem of the high-level software that uses kubeadm (e.g. kind).
if a kube-apiserver is not accessible, kubeadm cannot join this new Node to the cluster. period. so yes, |
It's not The problem is that the address I provide to |
The kube-apiserver is accessible via port forwarding. It is not accessible at the original address that was specified using |
please log a separate issue and provide IP addresses and concrete examples of your setup. |
@neolit123 it's not clear to me why yet another issue is needed. This issue has already been reported several times over the past several years and it's the same problem every time: you run |
let's start in a fresh issue to see:
|
in fact, i'd be really curious about the above because looking at our logic for 1.17 and 1.18 under: the endpoint you feed as positional argument or via JoinConfiguration ends up in the validated bootstrap-kubelet.conf that is written on disk. |
FEATURE REQUEST
What happened?
kubeadm join node not using the ip:port in join command. I want to using the LB ip and port to join node.
master0 1.1.1.1:6443
master1 2.2.2.2:6443
LB 3.3.3.3:6443
using kubeadm join 3.3.3.3:6443 ... but kubelet config and kube-proxy config may also be master0 ip or master1 ip, this behaviour is not expected in HA.
What you expected to happen?
I want kubeadm render configs using ip port in kubeadm join command.
Anything else we need to know?
Now I need change the node kubelet config and kubeproxy config manually
The text was updated successfully, but these errors were encountered: