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