-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
cluster reboots don't preserve node ip when additional networks are attached #2917
Comments
I don't really understand your comment about can you paste the output of |
root@west-worker5:/# getent ahostsv4 "$(hostname)"
192.168.61.3 STREAM west-worker5
192.168.61.3 DGRAM
192.168.61.3 RAW
192.168.36.3 STREAM
192.168.36.3 DGRAM
192.168.36.3 RAW
172.19.0.7 STREAM
172.19.0.7 DGRAM
172.19.0.7 RAW
root@west-worker5:/# root@west-worker5:/# head -n1 <(timeout 5 getent ahostsv4 "$(hostname)")
192.168.61.3 STREAM west-worker5
root@west-worker5:/# the node ip is 172.19.0.7 the ips for attached networks are 192.168.61.3 and 192.168.36.3 |
why are there 3 different ips on that container? |
so, while I think it may be a bug how we detect the IP (probably we want the one from the clusters can function fine with the IP changing, we re-roll the certs and nearly everything in the cluster should be using the node name or else kubernetes.default, not the IP.
|
we can't support that at this moment, multi network is not a thing in Kubernetes ... yet ;) |
For an immediate workaround, depending on what you are trying to do exactly, it may be more appropriate to attach other containers to the kind network than attach kind nodes to another network. |
i'll try to figure out a solution to preserve the IP from the original network, don't worry. i'm using multus on some nodes and need to attach the network to the node to provide other interfaces to pods |
I don't think there's a good way to do this without an active component on the host because we would need to know which network the IP ranges fall into. If people are mutating the networks on their own outside of kind even the As far as I know docker / podman only expose this info via the host socket inspecting the network or containers. |
What happened:
node ip wasn't preserved
What you expected to happen:
node ip preserved
How to reproduce it (as minimally and precisely as possible):
start cluster, attach a network to a node, restart container
Anything else we need to know?:
entrypoint script assumes
head
for detecting ip which doesn't match the omitted (byhead
) existingthe node ip in 172.18.x.x the network attached is 192.168.x.x. the ip from attached network may be listed first
Environment:
ubuntu-2204
kind version
): 0.15kubectl version
):docker info
):/etc/os-release
):The text was updated successfully, but these errors were encountered: