Set kubelet's --no-ip on IPv6-only clusters

This commit is contained in:
Peter Rifel 2021-09-30 07:23:03 -05:00
parent 724804025b
commit 7ce1cdc065
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
1 changed files with 4 additions and 0 deletions

View File

@ -247,6 +247,10 @@ func (b *KubeletBuilder) buildSystemdEnvironmentFile(kubeletConfig *kops.Kubelet
flags += " --tls-private-key-file=" + b.PathSrvKubernetes() + "/kubelet-server.key"
}
if b.Cluster.Spec.IsIPv6Only() {
flags += " --node-ip=::"
}
sysconfig := "DAEMON_ARGS=\"" + flags + "\"\n"
// Makes kubelet read /root/.docker/config.json properly
sysconfig = sysconfig + "HOME=\"/root" + "\"\n"