diff --git a/pkg/daemons/agent/agent_linux.go b/pkg/daemons/agent/agent_linux.go index f493309c37..6b788be7b7 100644 --- a/pkg/daemons/agent/agent_linux.go +++ b/pkg/daemons/agent/agent_linux.go @@ -121,9 +121,11 @@ func kubeletArgs(cfg *config.Agent) map[string]string { if cfg.NodeName != "" { argsMap["hostname-override"] = cfg.NodeName } - defaultIP, err := net.ChooseHostInterface() - if err != nil || defaultIP.String() != cfg.NodeIP { - argsMap["node-ip"] = cfg.NodeIP + if nodeIPs := util.JoinIPs(cfg.NodeIPs); nodeIPs != "" { + defaultIP, err := net.ChooseHostInterface() + if err != nil || defaultIP.String() != nodeIPs { + argsMap["node-ip"] = nodeIPs + } } kubeletRoot, runtimeRoot, controllers := cgroups.CheckCgroups() if !controllers["cpu"] {