From 1b22316ae2fe4d636bd910d7a9e8e4a14704b88c Mon Sep 17 00:00:00 2001 From: alecsandru Date: Sat, 4 May 2024 14:41:48 +0000 Subject: [PATCH] Update 'k8s/initialize.yml' --- k8s/initialize.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/k8s/initialize.yml b/k8s/initialize.yml index e2dbc03..5435838 100644 --- a/k8s/initialize.yml +++ b/k8s/initialize.yml @@ -35,7 +35,16 @@ - name: Show command debug: msg: "{{ hostvars['K8S_CP_JOIN_DH']['token'] }}" - +- name: Join k8s masters to the cluster + hosts: masters + become: yes + become_method: sudo + become_user: root + tasks: + - name: Execute image pull + shell: kubeadm config images pull + - name: Join the clusters + shell: {{ hostvars['K8S_CP_JOIN_DH']['token'] }} # - name: Reboot machine to finaliza presetup # reboot: # reboot_timeout: 3600 \ No newline at end of file