Skip to content

feat: make virtual-node kubelet port configurable via VK_KUBELET_PORT#32

Merged
CMGS merged 1 commit into
mainfrom
feat/configurable-kubelet-port
Jul 12, 2026
Merged

feat: make virtual-node kubelet port configurable via VK_KUBELET_PORT#32
CMGS merged 1 commit into
mainfrom
feat/configurable-kubelet-port

Conversation

@CMGS

@CMGS CMGS commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

What

kubeletAPIPort was a hardcoded 10250 const driving both the advertised DaemonEndpoint.Port and — via the nodeutil default — 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

  • kubeletAPIPort now reads VK_KUBELET_PORT (default 10250) and drives both HTTPListenAddr (the listener) and the advertised DaemonEndpoint.Port, keeping them consistent.
  • Default behavior is unchanged (:10250).
  • README env-var table updated.

Test

  • make lint clean on linux + darwin.
  • On a k3s-colocated host: with VK_KUBELET_PORT=10260 the virtual node registers Ready and serves its kubelet API on :10260 while k3s keeps :10250; without the override the process crash-looped on bind: address already in use.

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.
@CMGS CMGS force-pushed the feat/configurable-kubelet-port branch from 2d8e36e to e6a2bab Compare July 12, 2026 13:50
@CMGS CMGS merged commit 57aa47f into main Jul 12, 2026
2 checks passed
@CMGS CMGS deleted the feat/configurable-kubelet-port branch July 12, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant