kubeasz/example/hosts.m-masters.example

85 lines
2.3 KiB
Plaintext
Raw Normal View History

# 'deploy' node, which the ansible-playbooks usually run on
# variable 'NTP_ENABLED(=yes/no)' enables/disables the NTP server 'chrony'
2017-11-11 19:14:21 +08:00
[deploy]
2018-08-17 09:18:55 +08:00
192.168.1.1 NTP_ENABLED=no
2017-11-11 19:14:21 +08:00
# 'etcd' cluster must have odd member(s) (1,3,5,...)
# variable 'NODE_NAME' is the distinct name of a member in 'etcd' cluster
2017-11-11 19:14:21 +08:00
[etcd]
192.168.1.1 NODE_NAME=etcd1
192.168.1.2 NODE_NAME=etcd2
192.168.1.3 NODE_NAME=etcd3
2017-11-11 19:14:21 +08:00
[kube-master]
192.168.1.1
192.168.1.2
2017-11-21 09:26:51 +08:00
# 'loadbalance' node, with 'haproxy+keepalived' installed
2017-11-21 09:26:51 +08:00
[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
2017-11-11 19:14:21 +08:00
[kube-node]
192.168.1.3
192.168.1.4
2017-11-11 19:14:21 +08:00
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
2017-12-25 15:05:21 +08:00
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
2017-12-25 15:05:21 +08:00
# group reserved, add new 'kube-master' in it
[new-master]
#192.168.1.5
# group reserved, add new 'kube-node' in it
2017-11-25 21:37:43 +08:00
[new-node]
#192.168.1.xx
2017-11-25 21:37:43 +08:00
2017-11-21 09:26:51 +08:00
[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"
2017-11-11 19:14:21 +08:00
# Network plugins supported: calico, flannel, kube-router, cilium
2018-02-25 12:30:15 +08:00
CLUSTER_NETWORK="flannel"
2018-01-02 22:12:51 +08:00
# K8S Service CIDR, not overlap with node(host) networking
2017-11-11 19:14:21 +08:00
SERVICE_CIDR="10.68.0.0/16"
# Cluster CIDR (Pod CIDR), not overlap with node(host) networking
2017-11-11 19:14:21 +08:00
CLUSTER_CIDR="172.20.0.0/16"
# NodePort Range
2017-12-17 17:48:44 +08:00
NODE_PORT_RANGE="20000-40000"
2017-11-11 19:14:21 +08:00
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
2017-11-11 19:14:21 +08:00
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
2017-11-11 19:14:21 +08:00
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
2017-11-11 19:14:21 +08:00
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
2017-11-11 19:14:21 +08:00
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- Additional Variables --------------------
# Binaries Directory
2018-05-06 09:08:09 +08:00
bin_dir="/opt/kube/bin"
2017-11-11 19:14:21 +08:00
# CA and other components cert/key Directory
2017-11-11 19:14:21 +08:00
ca_dir="/etc/kubernetes/ssl"
# Deploy Directory (kubeasz workspace), don't change the default value right now
2017-11-11 19:14:21 +08:00
base_dir="/etc/ansible"