diff --git a/data/data.json b/data/data.json index edf3394d9..b5a078114 100644 --- a/data/data.json +++ b/data/data.json @@ -9161,7 +9161,7 @@ }, "kubeproxy": { "enable-dsr": "false", - "feature-gates": "WinOverlay=true", + "feature-gates": "IPv6DualStack=false", "healthz-bind-address": "127.0.0.1", "proxy-mode": "kernelspace", "v": "2" diff --git a/rke/k8s_windows_service_options.go b/rke/k8s_windows_service_options.go index 9bcd0862a..2f70b2337 100644 --- a/rke/k8s_windows_service_options.go +++ b/rke/k8s_windows_service_options.go @@ -7,7 +7,7 @@ func loadK8sVersionWindowsServiceOptions() map[string]v3.KubernetesServicesOptio return map[string]v3.KubernetesServicesOptions{ "v1.21": { Kubelet: getWindowsKubeletOptions121(), - Kubeproxy: getWindowsKubeProxyOptions(), + Kubeproxy: getWindowsKubeProxyOptions121(), }, "v1.20": { Kubelet: getWindowsKubeletOptions116(), @@ -89,6 +89,19 @@ func getWindowsKubeletOptions121() map[string]string { return kubeletOptions } +func getWindowsKubeProxyOptions121() map[string]string { + kubeProxyOptions := getKubeProxyOptions() + + // use kernelspace proxy mode + kubeProxyOptions["proxy-mode"] = "kernelspace" + // disable Windows IPv6DualStack support, WinOverlay already defaults to true + kubeProxyOptions["feature-gates"] = "IPv6DualStack=false" + // disable Windows DSR support explicitly + kubeProxyOptions["enable-dsr"] = "false" + + return kubeProxyOptions +} + func getWindowsKubeProxyOptions() map[string]string { kubeProxyOptions := getKubeProxyOptions()