Support kubelet node ip flag configuration#138
Merged
wenxuan0923 merged 2 commits intomainfrom Apr 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for configuring kubelet’s --node-ip flag in the agent’s kubelet bootstrapping flow, matching the capability already present in the kubeadm component so nodes with multiple NICs can reliably register with the intended primary IP.
Changes:
- Extend agent configuration (
KubeletConfig) with anodeIPsetting. - Plumb
nodeIPthrough the bootstrapper into the kubelet component action (StartKubeletServiceSpec.node_ip). - Render
--node-ipinto the kubelet systemd drop-in when configured.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/config/structs.go | Adds nodeIP to the agent’s kubelet configuration struct. |
| pkg/bootstrapper/components.go | Passes configured nodeIP into the kubelet Start action using an optional pointer. |
| components/kubelet/v20260301/kubelet_service.go | Makes node_ip available to the systemd drop-in templating parameters. |
| components/kubelet/v20260301/assets/20-flex-node-node-config.conf | Appends --node-ip to KUBELET_NODE_CONFIG_ARGS when NodeIP is set. |
| components/kubelet/action.proto | Adds node_ip to StartKubeletServiceSpec. |
| components/kubelet/action.pb.go | Regenerates protobuf bindings to include the new field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
runzhen
approved these changes
Apr 2, 2026
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.
Add support for the --node-ip kubelet flag in the kubelet bootstrapping path, mirroring the existing support already present in the kubeadm component.
The --node-ip kubelet flag tells kubelet which IP address to advertise as the node's primary IP to the Kubernetes control plane.
It's useful when a machine has multiple network interfaces (e.g., a management NIC and a data NIC) and you need to ensure the node registers with the correct IP — the one other pods/nodes should use to reach it. Without it, kubelet picks an IP automatically, which may be the wrong interface.