Closed wenzong closed 2 years ago
Hi. All kubernetes component IPs can be configured with the kubeadm API and with patches. https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/control-plane-flags/
If you do not pass the custom IPs all of them use the same default route detection and they will fail in your case. That is how k8s is designed, so instead of setting the IP per every component best to make the default route IP detection available on the host.
/kind support
Hi. All kubernetes component IPs can be configured with the kubeadm API and with patches. https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/control-plane-flags/
If you do not pass the custom IPs all of them use the same default route detection and they will fail in your case. That is how k8s is designed, so instead of setting the IP per every component best to make the default route IP detection available on the host.
/kind support
Thanks for your reply.
But it's confusing since run kubeadm init
with --apiserver-advertise-address
won't complain such problem. However run kubeadm join
with --apiserver-adverise-address
will fail, and kubeadm config images list
should have nothing to do with network settings, I guess?
Most kubeadm commands dynamically populate a config in memory and IPs are part of the config.
The whole feature "configure all components with custom IPs" is already possible...But it is very messy for the user. Instead you can use the 'ip route' command to create a route that goes to any IP that you want..This is what i would like to see documented in the docs.
And contributions for that are welcome.
Most kubeadm commands dynamically populate a config in memory and IPs are part of the config.
The whole feature "configure all components with custom IPs" is already possible...But it is very messy for the user. Instead you can use the 'ip route' command to create a route that goes to any IP that you want..This is what i would like to see documented in the docs.
And contributions for that are welcome.
Thanks again.
So use the patches or change the routing table, both should fix the complain.
Actually I used route
command to fix the route and bypass the problem, what I am really looking for is the patches method. Will take some time to look into it.
Closing the issue for now.
Most kubeadm commands dynamically populate a config in memory and IPs are part of the config. The whole feature "configure all components with custom IPs" is already possible...But it is very messy for the user. Instead you can use the 'ip route' command to create a route that goes to any IP that you want..This is what i would like to see documented in the docs. And contributions for that are welcome.
Thanks again.
So use the patches or change the routing table, both should fix the complain.
Actually I used
route
command to fix the route and bypass the problem, what I am really looking for is the patches method. Will take some time to look into it.Closing the issue for now.
Can you provide the steps to fix the route issue and bypass the problem?
Most kubeadm commands dynamically populate a config in memory and IPs are part of the config. The whole feature "configure all components with custom IPs" is already possible...But it is very messy for the user. Instead you can use the 'ip route' command to create a route that goes to any IP that you want..This is what i would like to see documented in the docs. And contributions for that are welcome.
Thanks again. So use the patches or change the routing table, both should fix the complain. Actually I used
route
command to fix the route and bypass the problem, what I am really looking for is the patches method. Will take some time to look into it. Closing the issue for now.Can you provide the steps to fix the route issue and bypass the problem?
I already post the command and route table above.
BTW, I'm not sure my workaround is suitable for your situation, please evaluate it then use at your own risk.(it may breaks your machine's network)
route del default
Recover command(work for me only)
route add default gw 127.0.0.53 tunnat
@rijuchatterjee
two methods:
route add default gw {gateway} via {device_name}
--bind-address
with the interface, which has ipv4 or ipv6 ipWIP docs to direct users to setting up default routes and not using the IP flags in k8s components, unless really needed: https://github.com/kubernetes/website/pull/43872
xref https://github.com/kubernetes/kubeadm/issues/2604#issuecomment-968071174
What keywords did you search in kubeadm issues before filing this one?
Similar issues found, but all of them are closed.
https://github.com/kubernetes/kubeadm/issues/1156 https://github.com/kubernetes/kubeadm/issues/2323 https://github.com/kubernetes/kubernetes/issues/95425 https://github.com/kubernetes/kubernetes/issues/95779
BUG REPORT
Versions
Environment:
What happened?
kubeadm join/config command not working properly.
after delete the default route table, kubeadm works properly
tunnat is the device for outside Internet access, thus I have to pre-download all images over Internet and delete the tunnat route, then I can run kubeadm join and other subcommands.
What you expected to happen?
kubeadm should work on such routing table, or give us some other option to set the IP manually.
How to reproduce it (as minimally and precisely as possible)?
Anything else we need to know?