2019-05-29 22:49:04 +08:00
|
|
|
# 'etcd' cluster should have odd member(s) (1,3,5,...)
|
2018-11-27 16:00:45 +08:00
|
|
|
# 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
|
|
|
|
|
2019-05-29 22:49:04 +08:00
|
|
|
# master node(s)
|
2018-11-27 16:00:45 +08:00
|
|
|
[kube-master]
|
2019-05-29 22:49:04 +08:00
|
|
|
192.168.1.1
|
2018-11-27 16:00:45 +08:00
|
|
|
192.168.1.2
|
|
|
|
|
2019-05-29 22:49:04 +08:00
|
|
|
# work node(s)
|
2018-11-27 16:00:45 +08:00
|
|
|
[kube-node]
|
2019-05-29 22:49:04 +08:00
|
|
|
192.168.1.3
|
2018-11-27 16:00:45 +08:00
|
|
|
192.168.1.4
|
|
|
|
|
2019-05-29 22:49:04 +08:00
|
|
|
# [optional] harbor server, a private docker registry
|
|
|
|
# 'NEW_INSTALL': 'yes' to install a harbor server; 'no' to integrate with existed one
|
2019-12-16 15:33:44 +08:00
|
|
|
# 'SELF_SIGNED_CERT': 'no' you need put files of certificates named harbor.pem and harbor-key.pem in directory 'down'
|
2018-11-27 16:00:45 +08:00
|
|
|
[harbor]
|
2019-12-16 15:33:44 +08:00
|
|
|
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no SELF_SIGNED_CERT=yes
|
2018-11-27 16:00:45 +08:00
|
|
|
|
2019-05-29 22:49:04 +08:00
|
|
|
# [optional] loadbalance for accessing k8s from outside
|
|
|
|
[ex-lb]
|
2019-05-30 21:37:01 +08:00
|
|
|
#192.168.1.6 LB_ROLE=backup EX_APISERVER_VIP=192.168.1.250 EX_APISERVER_PORT=8443
|
|
|
|
#192.168.1.7 LB_ROLE=master EX_APISERVER_VIP=192.168.1.250 EX_APISERVER_PORT=8443
|
2018-11-27 16:00:45 +08:00
|
|
|
|
2019-05-30 21:37:01 +08:00
|
|
|
# [optional] ntp server for the cluster
|
2019-05-29 22:49:04 +08:00
|
|
|
[chrony]
|
|
|
|
#192.168.1.1
|
2018-11-27 16:00:45 +08:00
|
|
|
|
2019-05-29 22:49:04 +08:00
|
|
|
[all:vars]
|
|
|
|
# --------- Main Variables ---------------
|
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"
|
|
|
|
|
2019-09-08 17:55:32 +08:00
|
|
|
# Service proxy mode of kube-proxy: 'iptables' or 'ipvs'
|
|
|
|
PROXY_MODE="ipvs"
|
|
|
|
|
2018-11-27 16:00:45 +08:00
|
|
|
# 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."
|
|
|
|
|
2019-06-09 15:20:09 +08:00
|
|
|
# -------- Additional Variables (don't change the default value right now) ---
|
2018-11-27 16:00:45 +08:00
|
|
|
# Binaries Directory
|
|
|
|
bin_dir="/opt/kube/bin"
|
|
|
|
|
|
|
|
# CA and other components cert/key Directory
|
|
|
|
ca_dir="/etc/kubernetes/ssl"
|
|
|
|
|
2019-06-09 15:20:09 +08:00
|
|
|
# Deploy Directory (kubeasz workspace)
|
2018-11-27 16:00:45 +08:00
|
|
|
base_dir="/etc/ansible"
|