This message was deleted.
# k3s
a
This message was deleted.
f
While booting, it says:
Copy code
2023-08-16T08:47:48.248771+00:00 init-node-1 k3s[1623]: time="2023-08-16T08:47:48Z" level=info msg="The interface eth0 with ipv4 address [public facing ip] will be used by flannel"
b
interesting, could you share the whole config?
f
Sure. All my config is done in Args.
["server","--token","********","--node-ip","100.73.247.116","--cluster-init"]
And a subsequent nodes get:
["server","--token","********","--node-ip","100.125.182.39","--server","<https://100.73.247.116:6443>"]
b
Any idea how can k3s/flannel know about your
[public facing ip]
?
Does your eth0 have two ip addresses? One being
100.73.247.116
and the second one being
[public facing ip]
?
f
Nope, eth0 only has the one public facing ip. 100.0.0.0/8 is on the device tailscale0.
Even when I run:
["server","--token","********","--node-ip","10.20.1.2","--node-external-ip","100.117.51.25","--cluster-init"]
I get:
2023-08-16T10:28:02.135273+00:00 init-node-0 k3s[1640]: time="2023-08-16T10:28:02Z" level=info msg="The interface eth0 with ipv4 address 49.13.64.173 will be used by flannel"
and
<http://flannel.alpha.coreos.com/public-ip|flannel.alpha.coreos.com/public-ip>: 49.13.64.173
So it doesnt use neither node-ip nor node-external-ip. πŸ™ˆ
The config is applied though.
Copy code
<http://k3s.io/external-ip|k3s.io/external-ip>: 100.117.51.25
<http://k3s.io/hostname|k3s.io/hostname>: init-node-0
<http://k3s.io/internal-ip|k3s.io/internal-ip>: 10.20.1.2
I will try setting
--flannel-iface
.
Okay, that works.
["server","--token","********","--node-ip","10.20.1.2","--flannel-iface","enp7s0","--node-external-ip","100.110.104.35","--cluster-init"]
gives:
<http://flannel.alpha.coreos.com/public-ip|flannel.alpha.coreos.com/public-ip>: 10.20.1.2
Should I open a bugreport for this? πŸ€”
b
The current code checks for flannel-iface and if that is not set, checks for the default routing rule and uses that interface
What is really weird is that it is picking the default route interface, in your case eth0, but not the IP of that interface
Are you sure your eth0 interface only has one IP address? Please use 'ip a' to check and not 'ifconfig'
f
It does pick my default route interface and its IP address. 😊
That's just not what I want it to do. πŸ™ˆ
From the docs I understand that flannel is supposed to use the internal IP. If not given the
--flannel-external-ip
parameter.
b
ah ok! I thought it was picking an address from somewhere which was not your interface
About the
node-ip
... I need to discuss this internally. Please open an issue in K3s about that πŸ™‚
What in the docs made you think that flannel is supposed to consume
node-ip
? That "feature" is not in the code, although it should not be hard to develop. I need to check whether it might trigger some regressions and what should happen if user sets
flannel-iface
and
node-ip
? In reality flannel takes care of the "data-plane" of the cluster, i.e. communication between pods. Whereas node-ip decides how the "control-plane" traffic flows, i.e. cluster communication between nodes and kube-api. Users might want to have both separated and thus not want flannel to process
node-ip
whatsoever
f
Installation/Network-Options docs says:
--flannel-external-ip
Use node external IP addresses as the destination for Flannel traffic, instead of internal IPs. Only applies when --node-external-ip is set on a node.
That made me think, that it uses "internal IPs" if not specified. 😊 Not the public IP of the default routed Interface. But I understand that this might be setup specific ... For Hetzner vServers the default routed interface is the public facing IP and private VLANs are attached later.
I can see how users want those planes seperated but I wonder if that is the default. I don't know too many cluster setups, but ours allways transfer all their stuff the same route ... no matter control or data.