mirror of https://github.com/easzlab/kubeasz.git
81 lines
2.2 KiB
Plaintext
81 lines
2.2 KiB
Plaintext
|
# 集群部署节点:一般为运行ansible 脚本的节点
|
|||
|
# 变量 NTP_ENABLED (=yes/no) 设置集群是否安装 chrony 时间同步, 公有云上虚机不需要
|
|||
|
[deploy]
|
|||
|
192.168.1.1 NTP_ENABLED=no
|
|||
|
|
|||
|
# etcd集群请提供如下NODE_NAME,注意etcd集群必须是1,3,5,7...奇数个节点
|
|||
|
[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
|
|||
|
|
|||
|
# 公有云上一般都有提供负载均衡产品,且不允许自己创建,lb 节点留空,仅保留组名
|
|||
|
[lb]
|
|||
|
|
|||
|
[kube-node]
|
|||
|
192.168.1.1
|
|||
|
192.168.1.4
|
|||
|
|
|||
|
# 参数 NEW_INSTALL:yes表示新建,no表示使用已有harbor服务器
|
|||
|
[harbor]
|
|||
|
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
|
|||
|
|
|||
|
# 预留组,后续添加master节点使用
|
|||
|
[new-master]
|
|||
|
#192.168.1.5
|
|||
|
|
|||
|
# 预留组,后续添加node节点使用
|
|||
|
[new-node]
|
|||
|
#192.168.1.xx
|
|||
|
|
|||
|
[all:vars]
|
|||
|
# ---------集群主要参数---------------
|
|||
|
#集群部署模式:allinone, single-master, multi-master
|
|||
|
DEPLOY_MODE=multi-master
|
|||
|
|
|||
|
#集群主版本号,目前支持: v1.8, v1.9, v1.10,v1.11
|
|||
|
K8S_VER="v1.10"
|
|||
|
|
|||
|
# 创建内网云负载均衡,然后配置:前端监听 tcp 8443,后端 tcp 6443,后端节点即 master 节点
|
|||
|
MASTER_IP="192.168.1.10" # 即负载均衡内网地址
|
|||
|
KUBE_APISERVER="https://{{ MASTER_IP }}:8443"
|
|||
|
|
|||
|
# 集群网络插件,目前支持calico, flannel, kube-router, cilium
|
|||
|
CLUSTER_NETWORK="flannel"
|
|||
|
|
|||
|
# 服务网段 (Service CIDR),注意不要与内网已有网段冲突
|
|||
|
SERVICE_CIDR="10.68.0.0/16"
|
|||
|
|
|||
|
# POD 网段 (Cluster CIDR),注意不要与内网已有网段冲突
|
|||
|
CLUSTER_CIDR="172.20.0.0/16"
|
|||
|
|
|||
|
# 服务端口范围 (NodePort Range)
|
|||
|
NODE_PORT_RANGE="20000-40000"
|
|||
|
|
|||
|
# kubernetes 服务 IP (预分配,一般是 SERVICE_CIDR 中第一个IP)
|
|||
|
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
|
|||
|
|
|||
|
# 集群 DNS 服务 IP (从 SERVICE_CIDR 中预分配)
|
|||
|
CLUSTER_DNS_SVC_IP="10.68.0.2"
|
|||
|
|
|||
|
# 集群 DNS 域名
|
|||
|
CLUSTER_DNS_DOMAIN="cluster.local."
|
|||
|
|
|||
|
# 集群basic auth 使用的用户名和密码
|
|||
|
BASIC_AUTH_USER="admin"
|
|||
|
BASIC_AUTH_PASS="test1234"
|
|||
|
|
|||
|
# ---------附加参数--------------------
|
|||
|
#默认二进制文件目录
|
|||
|
bin_dir="/opt/kube/bin"
|
|||
|
|
|||
|
#证书目录
|
|||
|
ca_dir="/etc/kubernetes/ssl"
|
|||
|
|
|||
|
#部署目录,即 ansible 工作目录,建议不要修改
|
|||
|
base_dir="/etc/ansible"
|