From f56e23b95cad090683c7af76237cec32ce0736ce Mon Sep 17 00:00:00 2001 From: alecsandru Date: Sat, 4 May 2024 12:38:51 +0000 Subject: [PATCH] Update 'k8s/initialize.yml' --- k8s/initialize.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/k8s/initialize.yml b/k8s/initialize.yml index fdbedba..c265d73 100644 --- a/k8s/initialize.yml +++ b/k8s/initialize.yml @@ -1,10 +1,14 @@ --- - name: Initialize the controlplane - hosts: masters + hosts: root_master become: yes become_method: sudo become_user: root tasks: - - name: Reboot machine to finaliza presetup - reboot: - reboot_timeout: 3600 \ No newline at end of file + - name: Initialize the control plane + shell: kubeadm init --pod-network-cidr={{ POD_NETWORK_CIDR }} --control-plane-endpoint "{{ APISERVER_VIP}}:{{ APISERVER_PORT }}" --upload-certs >> /etc/kubernetes/setup.out + args: chdir $HOME + creates: /etc/kubernetes/setup.out + # - name: Reboot machine to finaliza presetup + # reboot: + # reboot_timeout: 3600 \ No newline at end of file