-
Notifications
You must be signed in to change notification settings - Fork 102
/
hosts.example
26 lines (21 loc) · 1.2 KB
/
hosts.example
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
# Use FullyQualifiedDomainNames (FQDN) (e.g. machine1.corp.example.com)
# make sure `hostname -s` returns indeed short name (e.g. master1)
# make sure `hostname -f` returns indeed the desired fqdn name (e.g. master1.corp.example.com)
# normally, ansible_fqdn should return the same as `hostname -f` (otherwise one can reach this: https://github.com/ansible/ansible/issues/38777 )
# try: `ansible localhost -m setup -a "filter=ansible_fqdn"` and make sure it matches: `hostname -f`
[primary-master]
master1.corp.example.com
[secondary-masters]
# If there is only one master, make this section empty
master[2:3].corp.example.com
[masters:children]
primary-master
secondary-masters
[nodes]
# If there is only one machine both master and node, make this section empty
# Best practice is to have few machines allocated for Prometheus/Ingresses/eventual ELK.
# These are usually labeled "infra", and tainted with NoSchedule or at least PreferNoSchedule
# See "taint_for_label" in group_vars/all/global.yaml
node[1:2].corp.example.com label=node-role.kubernetes.io/infra=
# All other nodes are automatically labeled "compute" and without any taint.
node[3:7].corp.example.com # label=node-role.kubernetes.io/compute=