From 98e6623d1050bd2f02a3b27e20269cf484befcf5 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Fri, 15 Feb 2019 09:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0example=20hosts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/hosts.allinone.example | 10 ++++++---- example/hosts.allinone.example.en | 10 ++++++---- example/hosts.cloud.example | 21 ++++++++++----------- example/hosts.cloud.example.en | 19 +++++++++---------- example/hosts.m-masters.example | 23 ++++++++++++----------- example/hosts.m-masters.example.en | 23 ++++++++++++----------- example/hosts.s-master.example | 10 ++++++---- example/hosts.s-master.example.en | 10 ++++++---- 8 files changed, 67 insertions(+), 59 deletions(-) diff --git a/example/hosts.allinone.example b/example/hosts.allinone.example index 4ce96b4..d0d25f3 100644 --- a/example/hosts.allinone.example +++ b/example/hosts.allinone.example @@ -7,21 +7,23 @@ [etcd] 192.168.1.1 NODE_NAME=etcd1 +[new-etcd] # 预留组,后续添加etcd节点使用 +#192.168.1.x NODE_NAME=etcdx + [kube-master] 192.168.1.1 [kube-node] 192.168.1.1 +[new-node] # 预留组,后续添加node节点使用 +#192.168.1.xx + # 参数 NEW_INSTALL:yes表示新建,no表示使用已有harbor服务器 # 如果不使用域名,可以设置 HARBOR_DOMAIN="" [harbor] #192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no -# 预留组,后续添加node节点使用 -[new-node] -#192.168.1.xx - # 【可选】外部负载均衡,用于自有环境负载转发 NodePort 暴露的服务等 [ex-lb] #192.168.1.6 LB_ROLE=backup EX_VIP=192.168.1.250 diff --git a/example/hosts.allinone.example.en b/example/hosts.allinone.example.en index 2768bb7..318bb4d 100644 --- a/example/hosts.allinone.example.en +++ b/example/hosts.allinone.example.en @@ -8,21 +8,23 @@ [etcd] 192.168.1.1 NODE_NAME=etcd1 +[new-etcd] # group reserved, add new 'etcd-node' in it +#192.168.1.x NODE_NAME=etcdx + [kube-master] 192.168.1.1 [kube-node] 192.168.1.1 +[new-node] # group reserved, add new 'kube-node' in it +#192.168.1.xx + # set 'NEW_INSTALL': 'yes' to install a harbor server; 'no' to integrate with existed one # if not using domian,set 'HARBOR_DOMAIN=""' [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 - # [optional] loadbalance for services with type 'NodePort' [ex-lb] #192.168.1.6 LB_ROLE=backup EX_VIP=192.168.1.250 diff --git a/example/hosts.cloud.example b/example/hosts.cloud.example index 3fbbbd2..b7bb115 100644 --- a/example/hosts.cloud.example +++ b/example/hosts.cloud.example @@ -9,30 +9,28 @@ 192.168.1.2 NODE_NAME=etcd2 192.168.1.3 NODE_NAME=etcd3 +[new-etcd] # 预留组,后续添加etcd节点使用 +#192.168.1.x NODE_NAME=etcdx + [kube-master] 192.168.1.2 192.168.1.3 -# 公有云上一般都有提供负载均衡产品,且不允许自己创建,lb 节点留空,仅保留组名 -[lb] +[new-master] # 预留组,后续添加master节点使用 +#192.168.1.5 [kube-node] 192.168.1.1 192.168.1.4 +[new-node] # 预留组,后续添加node节点使用 +#192.168.1.xx + # 参数 NEW_INSTALL:yes表示新建,no表示使用已有harbor服务器 # 如果不使用域名,可以设置 HARBOR_DOMAIN="" [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 @@ -41,7 +39,8 @@ DEPLOY_MODE=multi-master #集群主版本号,目前支持: v1.8, v1.9, v1.10,v1.11, v1.12, v1.13 K8S_VER="v1.10" -# 创建内网云负载均衡,然后配置:前端监听 tcp 8443,后端 tcp 6443,后端节点即 master 节点 +# 公有云上一般都有提供负载均衡产品,且不允许自己创建lb +# 创建公有云内网负载均衡,然后配置:前端监听 tcp 8443,后端 tcp 6443,后端节点即 master 节点 MASTER_IP="192.168.1.10" # 即负载均衡内网地址 KUBE_APISERVER="https://{{ MASTER_IP }}:8443" diff --git a/example/hosts.cloud.example.en b/example/hosts.cloud.example.en index 59de434..3bf7864 100644 --- a/example/hosts.cloud.example.en +++ b/example/hosts.cloud.example.en @@ -10,30 +10,28 @@ 192.168.1.2 NODE_NAME=etcd2 192.168.1.3 NODE_NAME=etcd3 +[new-etcd] # group reserved, add new 'etcd-node' in it +#192.168.1.x NODE_NAME=etcdx + [kube-master] 192.168.1.2 192.168.1.3 -# use loadballance service by the Cloud Providor, no 'lb' nodes needed -[lb] +[new-master] # group reserved, add new 'kube-master' in it +#192.168.1.5 [kube-node] 192.168.1.1 192.168.1.4 +[new-node] # group reserved, add new 'kube-node' in it +#192.168.1.xx + # set 'NEW_INSTALL': 'yes' to install a harbor server; 'no' to integrate with existed one # if not using domian,set 'HARBOR_DOMAIN=""' [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 @@ -42,6 +40,7 @@ DEPLOY_MODE=multi-master # Versions supported: v1.8, v1.9, v1.10, v1.11, v1.12, v1.13 K8S_VER="v1.10" +# use loadballance service by the Cloud Providor, no 'lb' nodes needed # 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" diff --git a/example/hosts.m-masters.example b/example/hosts.m-masters.example index c5ed6d0..5170e43 100644 --- a/example/hosts.m-masters.example +++ b/example/hosts.m-masters.example @@ -9,31 +9,32 @@ 192.168.1.2 NODE_NAME=etcd2 192.168.1.3 NODE_NAME=etcd3 +[new-etcd] # 预留组,后续添加etcd节点使用 +#192.168.1.x NODE_NAME=etcdx + [kube-master] 192.168.1.1 192.168.1.2 -# 负载均衡(目前已支持多于2节点,一般2节点就够了) 安装 haproxy+keepalived -[lb] -192.168.1.1 LB_ROLE=backup -192.168.1.2 LB_ROLE=master +[new-master] # 预留组,后续添加master节点使用 +#192.168.1.5 [kube-node] 192.168.1.3 192.168.1.4 +[new-node] # 预留组,后续添加node节点使用 +#192.168.1.xx + # 参数 NEW_INSTALL:yes表示新建,no表示使用已有harbor服务器 # 如果不使用域名,可以设置 HARBOR_DOMAIN="" [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 +# 负载均衡(目前已支持多于2节点,一般2节点就够了) 安装 haproxy+keepalived +[lb] +192.168.1.1 LB_ROLE=backup +192.168.1.2 LB_ROLE=master #【可选】外部负载均衡,用于自有环境负载转发 NodePort 暴露的服务等 [ex-lb] diff --git a/example/hosts.m-masters.example.en b/example/hosts.m-masters.example.en index a53790d..f83f4a5 100644 --- a/example/hosts.m-masters.example.en +++ b/example/hosts.m-masters.example.en @@ -10,31 +10,32 @@ 192.168.1.2 NODE_NAME=etcd2 192.168.1.3 NODE_NAME=etcd3 +[new-etcd] # group reserved, add new 'etcd-node' in it +#192.168.1.x NODE_NAME=etcdx + [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 +[new-master] # group reserved, add new 'kube-master' in it +#192.168.1.5 [kube-node] 192.168.1.3 192.168.1.4 +[new-node] # group reserved, add new 'kube-node' in it +#192.168.1.xx + # set 'NEW_INSTALL': 'yes' to install a harbor server; 'no' to integrate with existed one # if not using domian,set 'HARBOR_DOMAIN=""' [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 +# 'loadbalance' node, with 'haproxy+keepalived' installed +[lb] +192.168.1.1 LB_ROLE=backup +192.168.1.2 LB_ROLE=master # [optional] loadbalance for services with type 'NodePort' [ex-lb] diff --git a/example/hosts.s-master.example b/example/hosts.s-master.example index 97ed296..58df450 100644 --- a/example/hosts.s-master.example +++ b/example/hosts.s-master.example @@ -7,6 +7,9 @@ [etcd] 192.168.1.1 NODE_NAME=etcd1 +[new-etcd] # 预留组,后续添加etcd节点使用 +#192.168.1.x NODE_NAME=etcdx + [kube-master] 192.168.1.1 @@ -14,15 +17,14 @@ 192.168.1.2 192.168.1.3 +[new-node] # 预留组,后续添加node节点使用 +#192.168.1.xx + # 参数 NEW_INSTALL:yes表示新建,no表示使用已有harbor服务器 # 如果不使用域名,可以设置 HARBOR_DOMAIN="" [harbor] #192.168.1.8 HARBOR_DOMAIN="harbor.yourdomain.com" NEW_INSTALL=no -# 预留组,后续添加node节点使用 -[new-node] -#192.168.1.xx - #【可选】外部负载均衡,用于自有环境负载转发 NodePort 暴露的服务等 [ex-lb] #192.168.1.6 LB_ROLE=backup EX_VIP=192.168.1.250 diff --git a/example/hosts.s-master.example.en b/example/hosts.s-master.example.en index adea230..5cc6e12 100644 --- a/example/hosts.s-master.example.en +++ b/example/hosts.s-master.example.en @@ -8,6 +8,9 @@ [etcd] 192.168.1.1 NODE_NAME=etcd1 +[new-etcd] # group reserved, add new 'etcd-node' in it +#192.168.1.x NODE_NAME=etcdx + [kube-master] 192.168.1.1 @@ -15,15 +18,14 @@ 192.168.1.2 192.168.1.3 +[new-node] # group reserved, add new 'kube-node' in it +#192.168.1.xx + # set 'NEW_INSTALL': 'yes' to install a harbor server; 'no' to integrate with existed one # if not using domian,set 'HARBOR_DOMAIN=""' [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 - # [optional] loadbalance for services with type 'NodePort' [ex-lb] #192.168.1.6 LB_ROLE=backup EX_VIP=192.168.1.250