kubeasz/example/hosts.cloud.example

82 lines
2.1 KiB
Plaintext
Raw Normal View History

2018-10-12 08:55:39 +08:00
# 'deploy' node, which the ansible-playbooks usually run on
# variable 'NTP_ENABLED(=yes/no)' enables/disables the NTP server 'chrony'
2018-09-14 14:41:16 +08:00
[deploy]
192.168.1.1 NTP_ENABLED=no
2018-10-12 08:55:39 +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
2018-09-14 14:41:16 +08:00
[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.2
192.168.1.3
2018-10-12 08:55:39 +08:00
# use loadballance service by the Cloud Providor, no 'lb' nodes needed
2018-09-14 14:41:16 +08:00
[lb]
[kube-node]
192.168.1.1
192.168.1.4
2018-10-12 08:55:39 +08:00
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
2018-09-14 14:41:16 +08:00
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
2018-10-12 08:55:39 +08:00
# group reserved, add new 'kube-master' in it
2018-09-14 14:41:16 +08:00
[new-master]
#192.168.1.5
2018-10-12 08:55:39 +08:00
# group reserved, add new 'kube-node' in it
2018-09-14 14:41:16 +08:00
[new-node]
#192.168.1.xx
[all:vars]
2018-10-12 08:55:39 +08:00
# --------- Main Variables ---------------
# Cluster Deployment Mode: allinone, single-master, multi-master
2018-09-14 14:41:16 +08:00
DEPLOY_MODE=multi-master
2018-10-12 08:55:39 +08:00
# Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12
2018-09-14 14:41:16 +08:00
K8S_VER="v1.10"
2018-10-12 08:55:39 +08:00
# cloud loadballance service: listen on tcp 8443, with kube-masters(apiservers) as backend servers
MASTER_IP="192.168.1.10"
2018-09-14 14:41:16 +08:00
KUBE_APISERVER="https://{{ MASTER_IP }}:8443"
2018-10-12 08:55:39 +08:00
# Network plugins supported: calico, flannel
2018-09-14 14:41:16 +08:00
CLUSTER_NETWORK="flannel"
2018-10-12 08:55:39 +08:00
# K8S Service CIDR, not overlap with node(host) networking
2018-09-14 14:41:16 +08:00
SERVICE_CIDR="10.68.0.0/16"
2018-10-12 08:55:39 +08:00
# Cluster CIDR (Pod CIDR), not overlap with node(host) networking
2018-09-14 14:41:16 +08:00
CLUSTER_CIDR="172.20.0.0/16"
2018-10-12 08:55:39 +08:00
# NodePort Range
2018-09-14 14:41:16 +08:00
NODE_PORT_RANGE="20000-40000"
2018-10-12 08:55:39 +08:00
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
2018-09-14 14:41:16 +08:00
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
2018-10-12 08:55:39 +08:00
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
2018-09-14 14:41:16 +08:00
CLUSTER_DNS_SVC_IP="10.68.0.2"
2018-10-12 08:55:39 +08:00
# Cluster DNS Domain
2018-09-14 14:41:16 +08:00
CLUSTER_DNS_DOMAIN="cluster.local."
2018-10-12 08:55:39 +08:00
# Basic auth for apiserver
2018-09-14 14:41:16 +08:00
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
2018-10-12 08:55:39 +08:00
# -------- Additional Variables --------------------
# Binaries Directory
2018-09-14 14:41:16 +08:00
bin_dir="/opt/kube/bin"
2018-10-12 08:55:39 +08:00
# CA and other components cert/key Directory
2018-09-14 14:41:16 +08:00
ca_dir="/etc/kubernetes/ssl"
2018-10-12 08:55:39 +08:00
# Deploy Directory (kubeasz workspace), don't change the default value right now
2018-09-14 14:41:16 +08:00
base_dir="/etc/ansible"