From 9a5438ce2f2fedeb11a0296d6f76eb73b60d0611 Mon Sep 17 00:00:00 2001 From: Egor Date: Tue, 27 Nov 2018 11:12:16 +0300 Subject: [PATCH] Fix kubeadm-config: add kube_network_node_prefix (#3761) --- .../kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 | 1 + .../kubernetes/master/templates/kubeadm-config.v1alpha2.yaml.j2 | 1 + .../kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 | 1 + 3 files changed, 3 insertions(+) diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 index bdef515fc..f1b05bb59 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 @@ -20,6 +20,7 @@ networking: dnsDomain: {{ dns_domain }} serviceSubnet: {{ kube_service_addresses }} podSubnet: {{ kube_pods_subnet }} + podNetworkCidr: "{{ kube_network_node_prefix }}" kubernetesVersion: {{ kube_version }} {% if cloud_provider is defined and cloud_provider not in ["gce", "oci"] %} cloudProvider: {{ cloud_provider }} diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1alpha2.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1alpha2.yaml.j2 index 5f1bcab2b..c0fc65714 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1alpha2.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1alpha2.yaml.j2 @@ -21,6 +21,7 @@ networking: dnsDomain: {{ dns_domain }} serviceSubnet: {{ kube_service_addresses }} podSubnet: {{ kube_pods_subnet }} + podNetworkCidr: "{{ kube_network_node_prefix }}" kubernetesVersion: {{ kube_version }} {% if cloud_provider is defined and cloud_provider != "gce" %} cloudProvider: {{ cloud_provider }} diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 index 4adbe2b8b..d4d20d2ed 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 @@ -36,6 +36,7 @@ networking: dnsDomain: {{ dns_domain }} serviceSubnet: {{ kube_service_addresses }} podSubnet: {{ kube_pods_subnet }} + podNetworkCidr: "{{ kube_network_node_prefix }}" kubernetesVersion: {{ kube_version }} {% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %} controlPlaneEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}