diff --git a/roles/kubernetes/kubeadm/tasks/main.yml b/roles/kubernetes/kubeadm/tasks/main.yml index cb29e2a6a..6b575df0f 100644 --- a/roles/kubernetes/kubeadm/tasks/main.yml +++ b/roles/kubernetes/kubeadm/tasks/main.yml @@ -53,10 +53,6 @@ kubeadm_token: "{{ temp_token.stdout }}" when: kubeadm_token is not defined -- name: Set kubeadm api version to v1beta3 - set_fact: - kubeadmConfig_api_version: v1beta3 - - name: Get kubeconfig for join discovery process command: "{{ kubectl }} -n kube-public get cm cluster-info -o jsonpath='{.data.kubeconfig}'" register: kubeconfig_file_discovery @@ -77,7 +73,7 @@ - name: Create kubeadm client config template: - src: "kubeadm-client.conf.{{ kubeadmConfig_api_version }}.j2" + src: "kubeadm-client.conf.j2" dest: "{{ kube_config_dir }}/kubeadm-client.conf" backup: true mode: "0640" diff --git a/roles/kubernetes/kubeadm/templates/kubeadm-client.conf.v1beta3.j2 b/roles/kubernetes/kubeadm/templates/kubeadm-client.conf.j2 similarity index 95% rename from roles/kubernetes/kubeadm/templates/kubeadm-client.conf.v1beta3.j2 rename to roles/kubernetes/kubeadm/templates/kubeadm-client.conf.j2 index 5016df9c3..a4e014ca7 100644 --- a/roles/kubernetes/kubeadm/templates/kubeadm-client.conf.v1beta3.j2 +++ b/roles/kubernetes/kubeadm/templates/kubeadm-client.conf.j2 @@ -1,5 +1,5 @@ --- -apiVersion: kubeadm.k8s.io/v1beta3 +apiVersion: kubeadm.k8s.io/{{ kubeadm_config_api_version }} kind: JoinConfiguration discovery: {% if kubeadm_use_file_discovery %}