From 8d2c40cdac63f8a948ae3225a4b9aff68ee07b23 Mon Sep 17 00:00:00 2001 From: Aofei Sheng Date: Tue, 9 Jan 2024 06:44:03 +0800 Subject: [PATCH] Use `ipFamilyPolicy: RequireDualStack` for dual-stack kube-dns (#8984) Signed-off-by: Aofei Sheng --- pkg/server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index 860f40ecb3..222056d25f 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -274,9 +274,9 @@ func stageFiles(ctx context.Context, sc *Context, controlConfig *config.Control) } dataDir = filepath.Join(controlConfig.DataDir, "manifests") - dnsIPFamilyPolicy := "PreferDualStack" - if len(controlConfig.ClusterDNSs) == 1 { - dnsIPFamilyPolicy = "SingleStack" + dnsIPFamilyPolicy := "SingleStack" + if len(controlConfig.ClusterDNSs) > 1 { + dnsIPFamilyPolicy = "RequireDualStack" } templateVars := map[string]string{