...
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
all:
hosts:
node1:
ansible_host: 192.168.100.1
ip: 192.168.100.1
access_ip: 192.168.100.1
node2:
ansible_host: 192.168.100.2
ip: 192.168.100.2
access_ip: 192.168.100.2
node3:
ansible_host: 192.168.100.3
ip: 192.168.100.23
access_ip: 192.168.100.23
node4:
ansible_host: 192.168.100.4
ip: 192.168.100.4
access_ip: 192.168.100.4
node5:
ansible_host: 192.168.100.5
ip: 192.168.100.5
access_ip: 192.168.100.5
node6:
ansible_host: 192.168.100.6
ip: 192.168.100.6
access_ip: 192.168.100.6
children:
kube-master:
hosts:
node1:
kube-node:
hosts:
node1:
node2:
node3:
etcd:
hosts:
node4:
node5:
node6:
k8s-cluster:
children:
kube-master:
kube-node:
etcd:
calico-rr:
hosts: {} |
It is divided into 2 parts: the first lists the IPs of the hosts, the second shows the role that each of them will have to assume within the k8s cluster. The second part, in turn, is composed of 3 groups:
...