Skip to content

Commit

Permalink
Set kubelet node-ip for dual-role nodes (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
kke authored Sep 9, 2021
1 parent 946a664 commit 1084aca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/cluster/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (h *Host) K0sInstallCommand() string {
flags.AddUnlessExist(fmt.Sprintf(`--config "%s"`, h.K0sConfigPath()))
}

if !h.IsController() && h.PrivateAddress != "" {
if strings.HasSuffix(h.Role, "worker") && h.PrivateAddress != "" {
// set worker's private address to --node-ip in --extra-kubelet-args
var extra Flags
if old := flags.GetValue("--kubelet-extra-args"); old != "" {
Expand Down

0 comments on commit 1084aca

Please sign in to comment.