Added basic setup for master and certification material

This commit is contained in:
2022-04-27 16:02:08 +02:00
parent 5f1ddaa73d
commit 2feefe0fd0
66 changed files with 2364 additions and 6 deletions

34
k8s_master.yml Normal file
View File

@@ -0,0 +1,34 @@
- name: Get Calico Definition
get_url:
url: https://docs.projectcalico.org/manifests/calico.yaml
dest: /tmp/calico.yml
delegate_to: k8s-master
run_once: true
- name: Copy kubeadm-crio.yaml to k8s-master
ansible.builtin.copy:
src: "files/{{ item }}"
dest: "/root/{{ item }}"
owner: root
group: root
mode: '0644'
loop:
- "kubeadm-crio.yaml"
- "kubeadm-config.yaml"
delegate_to: k8s-master
run_once: true
- name: Init Cluster
shell: >
kubeadm init --config=/root/kubeadm-config.yaml --upload-certs | tee kubeadm-init.out
register: kubeadm_init
delegate_to: k8s-master
run_once: true
- debug:
msg: "{{ kubeadm_init.stdout }}"
run_once: true
- name: enable Calico
shell: kubectl apply -f /tmp/calico.yaml