feat: make virtual-node kubelet port configurable via VK_KUBELET_PORT#32
Merged
Conversation
Both the listener and the advertised DaemonEndpoint hardcoded :10250, so co-locating vk-cocoon with a real kubelet that owns :10250 (e.g. a k3s server node) fails to bind and crash-loops the node. Read the port from VK_KUBELET_PORT (default 10250) and drive both from it.
2d8e36e to
e6a2bab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
kubeletAPIPortwas a hardcoded10250const driving both the advertisedDaemonEndpoint.Portand — via thenodeutildefault — the kubelet HTTP listener.Why
On a host where vk-cocoon runs next to a real kubelet that already owns
*:10250(e.g. a single-node k3s server that is also the cocoon-vm node), the listener cannot bind:10250. The node runner treats the bind failure as fatal, so the process crash-loops and the virtual node never stays Ready.Change
kubeletAPIPortnow readsVK_KUBELET_PORT(default10250) and drives bothHTTPListenAddr(the listener) and the advertisedDaemonEndpoint.Port, keeping them consistent.:10250).Test
make lintclean onlinux+darwin.VK_KUBELET_PORT=10260the virtual node registersReadyand serves its kubelet API on:10260while k3s keeps:10250; without the override the process crash-looped onbind: address already in use.