diff --git a/pkg/model/components/kubeproxy.go b/pkg/model/components/kubeproxy.go index 207dd75cb84b9..4a8e008362ac7 100644 --- a/pkg/model/components/kubeproxy.go +++ b/pkg/model/components/kubeproxy.go @@ -59,18 +59,20 @@ func (b *KubeProxyOptionsBuilder) BuildOptions(o interface{}) error { // * dns is set up by dns-controller // * dns-controller talks to the API using the kube-proxy configured kubernetes service - if config.ClusterCIDR == "" { - // If we're using the AmazonVPC networking, we should omit the ClusterCIDR - // because pod IPs are real, routable IPs in the VPC, and they are not in a specific - // CIDR range that allows us to distinguish them from other IPs. Omitting the ClusterCIDR - // causes kube-proxy never to SNAT when proxying clusterIPs, which is the behavior - // we want for pods. - // If we're not using the AmazonVPC networking, and the KubeControllerMananger has - // a ClusterCIDR, use that because most networking plug ins draw pod IPs from this range. - if clusterSpec.Networking.AmazonVPC == nil && clusterSpec.KubeControllerManager != nil { - config.ClusterCIDR = clusterSpec.KubeControllerManager.ClusterCIDR + /* + if config.ClusterCIDR == "" { + // If we're using the AmazonVPC networking, we should omit the ClusterCIDR + // because pod IPs are real, routable IPs in the VPC, and they are not in a specific + // CIDR range that allows us to distinguish them from other IPs. Omitting the ClusterCIDR + // causes kube-proxy never to SNAT when proxying clusterIPs, which is the behavior + // we want for pods. + // If we're not using the AmazonVPC networking, and the KubeControllerMananger has + // a ClusterCIDR, use that because most networking plug ins draw pod IPs from this range. + if clusterSpec.Networking.AmazonVPC == nil && clusterSpec.KubeControllerManager != nil { + config.ClusterCIDR = clusterSpec.KubeControllerManager.ClusterCIDR + } } - } + */ // Set the kube-proxy hostname-override (actually the NodeName), to avoid #2915 et al cloudProvider := kops.CloudProviderID(clusterSpec.CloudProvider)