From 35e5adaf0adf1348a3c58a65979d7b9b4efde628 Mon Sep 17 00:00:00 2001 From: rongzhang Date: Thu, 30 Aug 2018 17:41:20 +0800 Subject: [PATCH] Fix kubeadm v1alpha1 configure --- .../templates/kubeadm-config.v1alpha1.yaml.j2 | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 index 684f31666..16474ad07 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 @@ -1,4 +1,4 @@ -apiVersion: kubeadm.k8s.io/v1alpha2 +apiVersion: kubeadm.k8s.io/v1alpha1 kind: MasterConfiguration api: {% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %} @@ -8,14 +8,13 @@ api: bindPort: {{ kube_apiserver_port }} {% endif %} etcd: - external: - endpoints: + endpoints: {% for endpoint in etcd_access_addresses.split(',') %} - - {{ endpoint }} + - {{ endpoint }} {% endfor %} - caFile: {{ kube_config_dir }}/ssl/etcd/ca.pem - certFile: {{ kube_config_dir }}/ssl/etcd/node-{{ inventory_hostname }}.pem - keyFile: {{ kube_config_dir }}/ssl/etcd/node-{{ inventory_hostname }}-key.pem + caFile: {{ kube_config_dir }}/ssl/etcd/ca.pem + certFile: {{ kube_config_dir }}/ssl/etcd/node-{{ inventory_hostname }}.pem + keyFile: {{ kube_config_dir }}/ssl/etcd/node-{{ inventory_hostname }}-key.pem networking: dnsDomain: {{ dns_domain }} serviceSubnet: {{ kube_service_addresses }} @@ -29,12 +28,6 @@ kubeProxy: {% if kube_proxy_mode == 'ipvs' and kube_version | version_compare('v1.10', '<') %} featureGates: SupportIPVSProxyMode=true mode: ipvs -{% elif kube_proxy_mode == 'ipvs' %} -kubeProxy: - config: - featureGates: - SupportIPVSProxyMode: true - mode: ipvs {% endif %} {% if kube_proxy_nodeport_addresses %} nodePortAddresses: [{{ kube_proxy_nodeport_addresses_cidr }}]