2020-12-25 11:53:00 +08:00
|
|
|
|
# 设置 APISERVER 地址
|
2021-01-19 17:41:00 +08:00
|
|
|
|
KUBE_APISERVER: "{%- if inventory_hostname in groups['kube_master'] -%} \
|
2020-12-25 11:53:00 +08:00
|
|
|
|
https://{{ inventory_hostname }}:6443 \
|
|
|
|
|
{%- else -%} \
|
2021-01-19 17:41:00 +08:00
|
|
|
|
{%- if groups['kube_master']|length > 1 -%} \
|
2020-12-25 11:53:00 +08:00
|
|
|
|
https://127.0.0.1:6443 \
|
|
|
|
|
{%- else -%} \
|
2021-01-19 17:41:00 +08:00
|
|
|
|
https://{{ groups['kube_master'][0] }}:6443 \
|
2020-12-25 11:53:00 +08:00
|
|
|
|
{%- endif -%} \
|
|
|
|
|
{%- endif -%}"
|
2021-01-07 09:30:50 +08:00
|
|
|
|
|
2021-01-19 20:20:05 +08:00
|
|
|
|
# node local dns cache 离线镜像
|
|
|
|
|
dnscache_offline: "k8s-dns-node-cache_{{ dnsNodeCacheVer }}.tar"
|
|
|
|
|
|
2021-01-07 09:30:50 +08:00
|
|
|
|
# 增加/删除 master 节点时,node 节点需要重新配置 haproxy
|
|
|
|
|
MASTER_CHG: "no"
|