From ac639b2a172a7914e917b103ee9ca21a8cecf7f5 Mon Sep 17 00:00:00 2001 From: Takashi Okamoto Date: Fri, 10 Aug 2018 04:25:10 -0400 Subject: [PATCH] Change kubeadm config to run etcd by kubeadm. --- .../templates/kubeadm-config.v1alpha1.yaml.j2 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 index fd569b887..14c4c445c 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/v1alpha1 +apiVersion: kubeadm.k8s.io/v1alpha2 kind: MasterConfiguration api: advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }} @@ -7,13 +7,14 @@ api: controlPlaneEndpoint: {{ kubeadm_config_api_fqdn }} {% endif %} etcd: - endpoints: + external: + 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 }}