Skip to content

Commit

Permalink
Worker configuration #110
Browse files Browse the repository at this point in the history
Worker configuration
  • Loading branch information
tanmaysawaji committed Apr 4, 2022
1 parent 646c5bc commit 363cc32
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions kube-cluster/workers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- hosts: control_plane
become: yes
gather_facts: false
tasks:
- name: get join command
shell: kubeadm token create --print-join-command
register: join_command_raw

- name: set join command
set_fact:
join_command: "{{ join_command_raw.stdout_lines[0] }}"


- hosts: workers
become: yes
tasks:
- name: join cluster
shell: "{{ hostvars['control1'].join_command }} >> node_joined.txt"
args:
chdir: $HOME
creates: node_joined.txt

0 comments on commit 363cc32

Please sign in to comment.