更新example文档

pull/398/head
gjmzj 2018-11-27 16:00:45 +08:00
parent 96c7572542
commit 7515816c74
8 changed files with 396 additions and 94 deletions

View File

@ -1,10 +1,9 @@
# 'deploy' node, which the ansible-playbooks usually run on
# variable 'NTP_ENABLED(=yes/no)' enables/disables the NTP server 'chrony'
# 集群部署节点一般为运行ansible 脚本的节点
# 变量 NTP_ENABLED (=yes/no) 设置集群是否安装 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集群请提供如下NODE_NAME注意etcd集群必须是1,3,5,7...奇数个节点
[etcd]
192.168.1.1 NODE_NAME=etcd1
@ -14,57 +13,57 @@
[kube-node]
192.168.1.1
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
# 参数 NEW_INSTALLyes表示新建no表示使用已有harbor服务器
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-node' in it
# 预留组后续添加node节点使用
[new-node]
#192.168.1.xx
[all:vars]
# --------- Main Variables ---------------
# Cluster Deployment Mode: allinone, single-master, multi-master
# ---------集群主要参数---------------
#集群部署模式:allinone, single-master, multi-master
DEPLOY_MODE=allinone
# Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12
#集群主版本号,目前支持: v1.8, v1.9, v1.10v1.11, v1.12
K8S_VER="v1.10"
# Cluster's Master IP, auto generated
#集群 MASTER IP自动生成
MASTER_IP="{{ groups['kube-master'][0] }}"
KUBE_APISERVER="https://{{ MASTER_IP }}:6443"
# Network plugins supported: calico, flannel, kube-router, cilium
# 集群网络插件,目前支持calico, flannel, kube-router, cilium
CLUSTER_NETWORK="flannel"
# K8S Service CIDR, not overlap with node(host) networking
# 服务网段 (Service CIDR注意不要与内网已有网段冲突
SERVICE_CIDR="10.68.0.0/16"
# Cluster CIDR (Pod CIDR), not overlap with node(host) networking
# POD 网段 (Cluster CIDR注意不要与内网已有网段冲突
CLUSTER_CIDR="172.20.0.0/16"
# NodePort Range
# 服务端口范围 (NodePort Range)
NODE_PORT_RANGE="20000-40000"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
# kubernetes 服务 IP (预分配,一般是 SERVICE_CIDR 中第一个IP)
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
# 集群 DNS 服务 IP (从 SERVICE_CIDR 中预分配)
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
# 集群 DNS 域名
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
# 集群basic auth 使用的用户名和密码
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- 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
#部署目录,即 ansible 工作目录
base_dir="/etc/ansible"

View File

@ -0,0 +1,70 @@
# '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.1
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-node' in it
[new-node]
#192.168.1.xx
[all:vars]
# --------- Main Variables ---------------
# Cluster Deployment Mode: allinone, single-master, multi-master
DEPLOY_MODE=allinone
# Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12
K8S_VER="v1.10"
# Cluster's Master IP, auto generated
MASTER_IP="{{ groups['kube-master'][0] }}"
KUBE_APISERVER="https://{{ MASTER_IP }}:6443"
# Network plugins supported: calico, flannel, kube-router, cilium
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"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- 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"

View File

@ -1,10 +1,9 @@
# 'deploy' node, which the ansible-playbooks usually run on
# variable 'NTP_ENABLED(=yes/no)' enables/disables the NTP server 'chrony'
# 集群部署节点一般为运行ansible 脚本的节点
# 变量 NTP_ENABLED (=yes/no) 设置集群是否安装 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集群请提供如下NODE_NAME注意etcd集群必须是1,3,5,7...奇数个节点
[etcd]
192.168.1.1 NODE_NAME=etcd1
192.168.1.2 NODE_NAME=etcd2
@ -14,68 +13,68 @@
192.168.1.2
192.168.1.3
# use loadballance service by the Cloud Providor, no 'lb' nodes needed
# 公有云上一般都有提供负载均衡产品且不允许自己创建lb 节点留空,仅保留组名
[lb]
[kube-node]
192.168.1.1
192.168.1.4
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
# 参数 NEW_INSTALLyes表示新建no表示使用已有harbor服务器
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-master' in it
# 预留组后续添加master节点使用
[new-master]
#192.168.1.5
# group reserved, add new 'kube-node' in it
# 预留组后续添加node节点使用
[new-node]
#192.168.1.xx
[all:vars]
# --------- Main Variables ---------------
# Cluster Deployment Mode: allinone, single-master, multi-master
# ---------集群主要参数---------------
#集群部署模式:allinone, single-master, multi-master
DEPLOY_MODE=multi-master
# Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12
#集群主版本号,目前支持: v1.8, v1.9, v1.10v1.11, v1.12
K8S_VER="v1.10"
# cloud loadballance service: listen on tcp 8443, with kube-masters(apiservers) as backend servers
MASTER_IP="192.168.1.10"
# 创建内网云负载均衡,然后配置:前端监听 tcp 8443后端 tcp 6443后端节点即 master 节点
MASTER_IP="192.168.1.10" # 即负载均衡内网地址
KUBE_APISERVER="https://{{ MASTER_IP }}:8443"
# Network plugins supported: calico, flannel
# 集群网络插件目前支持calico, flannel, kube-router, cilium
CLUSTER_NETWORK="flannel"
# K8S Service CIDR, not overlap with node(host) networking
# 服务网段 (Service CIDR注意不要与内网已有网段冲突
SERVICE_CIDR="10.68.0.0/16"
# Cluster CIDR (Pod CIDR), not overlap with node(host) networking
# POD 网段 (Cluster CIDR注意不要与内网已有网段冲突
CLUSTER_CIDR="172.20.0.0/16"
# NodePort Range
# 服务端口范围 (NodePort Range)
NODE_PORT_RANGE="20000-40000"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
# kubernetes 服务 IP (预分配,一般是 SERVICE_CIDR 中第一个IP)
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
# 集群 DNS 服务 IP (从 SERVICE_CIDR 中预分配)
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
# 集群 DNS 域名
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
# 集群basic auth 使用的用户名和密码
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- 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
#部署目录,即 ansible 工作目录,建议不要修改
base_dir="/etc/ansible"

View File

@ -0,0 +1,81 @@
# '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
192.168.1.2 NODE_NAME=etcd2
192.168.1.3 NODE_NAME=etcd3
[kube-master]
192.168.1.2
192.168.1.3
# use loadballance service by the Cloud Providor, no 'lb' nodes needed
[lb]
[kube-node]
192.168.1.1
192.168.1.4
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-master' in it
[new-master]
#192.168.1.5
# group reserved, add new 'kube-node' in it
[new-node]
#192.168.1.xx
[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"
# cloud loadballance service: listen on tcp 8443, with kube-masters(apiservers) as backend servers
MASTER_IP="192.168.1.10"
KUBE_APISERVER="https://{{ MASTER_IP }}:8443"
# Network plugins supported: calico, flannel
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"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- 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"

View File

@ -1,10 +1,9 @@
# 'deploy' node, which the ansible-playbooks usually run on
# variable 'NTP_ENABLED(=yes/no)' enables/disables the NTP server 'chrony'
# 集群部署节点一般为运行ansible 脚本的节点
# 变量 NTP_ENABLED (=yes/no) 设置集群是否安装 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集群请提供如下NODE_NAME注意etcd集群必须是1,3,5,7...奇数个节点
[etcd]
192.168.1.1 NODE_NAME=etcd1
192.168.1.2 NODE_NAME=etcd2
@ -14,7 +13,7 @@
192.168.1.1
192.168.1.2
# 'loadbalance' node, with 'haproxy+keepalived' installed
# 负载均衡(目前已支持多于2节点一般2节点就够了) 安装 haproxy+keepalived
[lb]
192.168.1.1 LB_ROLE=backup
192.168.1.2 LB_ROLE=master
@ -23,62 +22,62 @@
192.168.1.3
192.168.1.4
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
# 参数 NEW_INSTALLyes表示新建no表示使用已有harbor服务器
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-master' in it
# 预留组后续添加master节点使用
[new-master]
#192.168.1.5
# group reserved, add new 'kube-node' in it
# 预留组后续添加node节点使用
[new-node]
#192.168.1.xx
[all:vars]
# --------- Main Variables ---------------
# Cluster Deployment Mode: allinone, single-master, multi-master
# ---------集群主要参数---------------
#集群部署模式:allinone, single-master, multi-master
DEPLOY_MODE=multi-master
# Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12
#集群主版本号,目前支持: v1.8, v1.9, v1.10v1.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即 LB节点VIP地址为区别与默认apiserver端口设置VIP监听的服务端口8443
# 公有云上请使用云负载均衡内网地址和监听端口
MASTER_IP="192.168.1.10"
KUBE_APISERVER="https://{{ MASTER_IP }}:8443"
# Network plugins supported: calico, flannel, kube-router, cilium
# 集群网络插件,目前支持calico, flannel, kube-router, cilium
CLUSTER_NETWORK="flannel"
# K8S Service CIDR, not overlap with node(host) networking
# 服务网段 (Service CIDR注意不要与内网已有网段冲突
SERVICE_CIDR="10.68.0.0/16"
# Cluster CIDR (Pod CIDR), not overlap with node(host) networking
# POD 网段 (Cluster CIDR注意不要与内网已有网段冲突
CLUSTER_CIDR="172.20.0.0/16"
# NodePort Range
# 服务端口范围 (NodePort Range)
NODE_PORT_RANGE="20000-40000"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
# kubernetes 服务 IP (预分配,一般是 SERVICE_CIDR 中第一个IP)
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
# 集群 DNS 服务 IP (从 SERVICE_CIDR 中预分配)
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
# 集群 DNS 域名
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
# 集群basic auth 使用的用户名和密码
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- 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
#部署目录,即 ansible 工作目录,建议不要修改
base_dir="/etc/ansible"

View File

@ -0,0 +1,84 @@
# '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
192.168.1.2 NODE_NAME=etcd2
192.168.1.3 NODE_NAME=etcd3
[kube-master]
192.168.1.1
192.168.1.2
# 'loadbalance' node, with 'haproxy+keepalived' installed
[lb]
192.168.1.1 LB_ROLE=backup
192.168.1.2 LB_ROLE=master
[kube-node]
192.168.1.3
192.168.1.4
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-master' in it
[new-master]
#192.168.1.5
# group reserved, add new 'kube-node' in it
[new-node]
#192.168.1.xx
[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"
# Network plugins supported: calico, flannel, kube-router, cilium
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"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- 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"

View File

@ -1,10 +1,9 @@
# 'deploy' node, which the ansible-playbooks usually run on
# variable 'NTP_ENABLED(=yes/no)' enables/disables the NTP server 'chrony'
# 集群部署节点一般为运行ansible 脚本的节点
# 变量 NTP_ENABLED (=yes/no) 设置集群是否安装 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集群请提供如下NODE_NAME请注意etcd集群必须是1,3,5,7...奇数个节点
[etcd]
192.168.1.1 NODE_NAME=etcd1
@ -15,57 +14,57 @@
192.168.1.2
192.168.1.3
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
# 参数 NEW_INSTALLyes表示新建no表示使用已有harbor服务器
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-node' in it
# 预留组后续添加node节点使用
[new-node]
#192.168.1.xx
[all:vars]
# --------- Main Variables ---------------
# Cluster Deployment Mode: allinone, single-master, multi-master
# ---------集群主要参数---------------
#集群部署模式:allinone, single-master, multi-master
DEPLOY_MODE=single-master
# Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12
#集群主版本号,目前支持: v1.8, v1.9, v1.10v1.11, v1.12
K8S_VER="v1.11"
# Cluster's Master IP, auto generated
#集群 MASTER IP自动生成
MASTER_IP="{{ groups['kube-master'][0] }}"
KUBE_APISERVER="https://{{ MASTER_IP }}:6443"
# Network plugins supported: calico, flannel, kube-router, cilium
# 集群网络插件,目前支持calico, flannel, kube-router, cilium
CLUSTER_NETWORK="flannel"
# K8S Service CIDR, not overlap with node(host) networking
# 服务网段 (Service CIDR注意不要与内网已有网段冲突
SERVICE_CIDR="10.68.0.0/16"
# Cluster CIDR (Pod CIDR), not overlap with node(host) networking
# POD 网段 (Cluster CIDR注意不要与内网已有网段冲突
CLUSTER_CIDR="172.20.0.0/16"
# NodePort Range
# 服务端口范围 (NodePort Range)
NODE_PORT_RANGE="20000-40000"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
# kubernetes 服务 IP (预分配,一般是 SERVICE_CIDR 中第一个IP)
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
# 集群 DNS 服务 IP (从 SERVICE_CIDR 中预分配)
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
# 集群 DNS 域名
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
# 集群basic auth 使用的用户名和密码
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- 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
#部署目录,即 ansible 工作目录
base_dir="/etc/ansible"

View File

@ -0,0 +1,71 @@
# '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
# variable NEW_INSTALL: 'yes' to setup a new harbor server; 'no' to integrate with existed one
[harbor]
#192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no
# group reserved, add new 'kube-node' in it
[new-node]
#192.168.1.xx
[all:vars]
# --------- Main Variables ---------------
# Cluster Deployment Mode: allinone, single-master, multi-master
DEPLOY_MODE=single-master
# Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12
K8S_VER="v1.11"
# Cluster's Master IP, auto generated
MASTER_IP="{{ groups['kube-master'][0] }}"
KUBE_APISERVER="https://{{ MASTER_IP }}:6443"
# Network plugins supported: calico, flannel, kube-router, cilium
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"
# Kubernetes SVC IP (usually assigned with the first available IP of 'SERVICE_CIDR')
CLUSTER_KUBERNETES_SVC_IP="10.68.0.1"
# Cluster DNS Server's IP (assigned with an available IP of 'SERVICE_CIDR')
CLUSTER_DNS_SVC_IP="10.68.0.2"
# Cluster DNS Domain
CLUSTER_DNS_DOMAIN="cluster.local."
# Basic auth for apiserver
BASIC_AUTH_USER="admin"
BASIC_AUTH_PASS="test1234"
# -------- 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"