forked from easzlab/kubeasz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hosts.m-masters.example
84 lines (63 loc) · 2.34 KB
/
hosts.m-masters.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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# 'deploy' node, which the ansible-playbooks usually run on
# variable 'NTP_ENABLED(=yes/no)' enables/disables the NTP server 'chrony'
[deploy]
192.168.1.1 NTP_ENABLED=no
# 'etcd' cluster must have odd member(s) (1,3,5,...)
# variable 'NODE_NAME' is the distinct name of a member in 'etcd' cluster
[etcd]
192.168.1.1 NODE_NAME=etcd1
192.168.1.2 NODE_NAME=etcd2
192.168.1.3 NODE_NAME=etcd3
[kube-master]
192.168.1.1
192.168.1.2
# 'loadbalance' node, with 'haproxy+keepalived' installed
[lb]
192.168.1.1 LB_IF="eth0" LB_ROLE=backup # replace 'etho' with node's network interface
192.168.1.2 LB_IF="eth0" LB_ROLE=master
[kube-node]
192.168.1.3
192.168.1.4
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-master' in it
[new-master]
#192.168.1.5
# group reserved, add new 'kube-node' in it
[new-node]
#192.168.1.xx
[all:vars]
# --------- Main Variables ---------------
# Cluster Deployment Mode: allinone, single-master, multi-master
DEPLOY_MODE=multi-master
# Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12
K8S_VER="v1.10"
# Cluster's Master IP, generated by 'keepalived' daemon on a 'lb' node here
# 'haproxy' daemon listens on port 8443, directs requests to real apiservers on port 6443
MASTER_IP="192.168.1.10"
KUBE_APISERVER="https://{{ MASTER_IP }}:8443"
# Network plugins supported: calico, flannel, kube-router, cilium
CLUSTER_NETWORK="flannel"
# K8S Service CIDR, not overlap with node(host) networking
SERVICE_CIDR="10.68.0.0/16"
# Cluster CIDR (Pod CIDR), not overlap with node(host) networking
CLUSTER_CIDR="172.20.0.0/16"
# NodePort Range
NODE_PORT_RANGE="20000-40000"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- Additional Variables --------------------
# Binaries Directory
bin_dir="/opt/kube/bin"
# CA and other components cert/key Directory
ca_dir="/etc/kubernetes/ssl"
# Deploy Directory (kubeasz workspace), don't change the default value right now
base_dir="/etc/ansible"