From 71347322d6c99e61805d9f7f4d23d7b6633c4166 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Wed, 12 Oct 2016 19:12:02 +0300 Subject: [PATCH] Add cluster-cidr to kube-proxy config This option enables masquerading for traffic directed at pods that comes frmom outside the cluster. --- roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 b/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 index f0c4bc211..7abffe053 100644 --- a/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 +++ b/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 @@ -17,6 +17,7 @@ spec: - --kubeconfig=/etc/kubernetes/node-kubeconfig.yaml {% endif %} - --bind-address={{ ip | default(ansible_default_ipv4.address) }} + - --cluster-cidr={{ kube_pods_subnet }} - --proxy-mode={{ kube_proxy_mode }} {% if kube_proxy_masquerade_all and kube_proxy_mode == "iptables" %} - --masquerade-all