-
Notifications
You must be signed in to change notification settings - Fork 30
/
setup-kubernetes.yml
66 lines (58 loc) · 2.1 KB
/
setup-kubernetes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Install and set up Kubernetes
---
- name: Install Kubernetes
hosts: k8s_masters, k8s_workers
become: true
any_errors_fatal: true
roles:
- roles/third_party/kubernetes/kubernetes-install
- name: Setup and initialize Kubernetes master node
hosts: k8s_masters
become: true
any_errors_fatal: true
roles:
- roles/third_party/kubernetes/setup-master-node
- name: Setup kubectl on masters and workers
hosts: k8s_masters, k8s_workers
become: true
any_errors_fatal: true
roles:
- roles/third_party/kubernetes/setup-kubectl
- name: Enable PodSecurity Policy
hosts: k8s_masters
become: true
any_errors_fatal: true
roles:
- roles/third_party/kubernetes/enable-pod-security-policy
- name: Install Kubernetes addons...
hosts: k8s_masters
serial: 1
become: true
any_errors_fatal: true
roles:
- roles/third_party/kubernetes/install-network-addons
- name: Join other masters to the cluster
hosts: k8s_masters
serial: 1
become: true
any_errors_fatal: true
roles:
- roles/third_party/kubernetes/join-master-nodes
- name: Setup Kubernetes worker nodes
hosts: k8s_workers
become: true
any_errors_fatal: true
roles:
- roles/third_party/kubernetes/setup-worker-node
- name: Allow pods to run on master in case of single node installation
hosts: k8s_masters, k8s_workers
become: true
any_errors_fatal: true
roles:
- roles/third_party/kubernetes/taint-all-nodes
- name: Setup Helm
hosts: k8s_admin
become: true
any_errors_fatal: true
roles:
- roles/third_party/helm-install