2018-11-27 16:00:45 +08:00
|
|
|
|
# '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
|
|
|
|
|
|
|
|
|
|
[kube-master]
|
|
|
|
|
192.168.1.1
|
|
|
|
|
|
|
|
|
|
[kube-node]
|
|
|
|
|
192.168.1.2
|
|
|
|
|
192.168.1.3
|
|
|
|
|
|
2019-02-07 15:10:49 +08:00
|
|
|
|
# set 'NEW_INSTALL': 'yes' to install a harbor server; 'no' to integrate with existed one
|
|
|
|
|
# if not using domian,set 'HARBOR_DOMAIN=""'
|
2018-11-27 16:00:45 +08:00
|
|
|
|
[harbor]
|
|
|
|
|
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
|
|
|
|
|
|
2019-02-07 15:10:49 +08:00
|
|
|
|
# [optional] loadbalance for services with type 'NodePort'
|
|
|
|
|
[ex-lb]
|
|
|
|
|
#192.168.1.6 LB_ROLE=backup EX_VIP=192.168.1.250
|
|
|
|
|
#192.168.1.7 LB_ROLE=master EX_VIP=192.168.1.250
|
|
|
|
|
|
2018-11-27 16:00:45 +08:00
|
|
|
|
[all:vars]
|
|
|
|
|
# --------- Main Variables ---------------
|
|
|
|
|
# Cluster Deployment Mode: allinone, single-master, multi-master
|
|
|
|
|
DEPLOY_MODE=single-master
|
|
|
|
|
|
|
|
|
|
# Cluster's Master IP, auto generated
|
|
|
|
|
MASTER_IP="{{ groups['kube-master'][0] }}"
|
|
|
|
|
KUBE_APISERVER="https://{{ MASTER_IP }}:6443"
|
|
|
|
|
|
2019-05-18 16:48:58 +08:00
|
|
|
|
# Cluster container-runtime supported: docker, containerd
|
|
|
|
|
CONTAINER_RUNTIME="docker"
|
|
|
|
|
|
2019-05-23 23:07:56 +08:00
|
|
|
|
# Network plugins supported: calico, flannel, kube-router, cilium, kube-ovn
|
2018-11-27 16:00:45 +08:00
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
# Cluster DNS Domain
|
|
|
|
|
CLUSTER_DNS_DOMAIN="cluster.local."
|
|
|
|
|
|
|
|
|
|
# -------- 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"
|