2019-08-05 20:57:59 +08:00
|
|
|
|
# 设置 dns svc ip (这里选用 SERVICE_CIDR 中第2个IP)
|
2019-08-07 14:52:25 +08:00
|
|
|
|
CLUSTER_DNS_SVC_IP: "{{ SERVICE_CIDR | ipaddr('net') | ipaddr(2) | ipaddr('address') }}"
|
2019-08-05 20:57:59 +08:00
|
|
|
|
|
2019-01-10 23:51:50 +08:00
|
|
|
|
# 基础容器镜像
|
2020-05-03 19:59:31 +08:00
|
|
|
|
SANDBOX_IMAGE: "easzlab/pause-amd64:3.2"
|
2019-01-10 23:51:50 +08:00
|
|
|
|
|
2018-08-29 22:16:50 +08:00
|
|
|
|
# Kubelet 根目录
|
|
|
|
|
KUBELET_ROOT_DIR: "/var/lib/kubelet"
|
2018-09-11 20:46:46 +08:00
|
|
|
|
|
|
|
|
|
# node节点最大pod 数
|
|
|
|
|
MAX_PODS: 110
|
2019-04-10 23:49:49 +08:00
|
|
|
|
|
|
|
|
|
# 配置为kube组件(kubelet,kube-proxy,dockerd等)预留的资源量
|
2020-05-23 15:16:01 +08:00
|
|
|
|
# 数值设置详见templates/kubelet-config.yaml.j2
|
2019-05-22 00:06:21 +08:00
|
|
|
|
KUBE_RESERVED_ENABLED: "yes"
|
2020-05-23 15:16:01 +08:00
|
|
|
|
|
|
|
|
|
# k8s 官方不建议草率开启 system-reserved, 除非你基于长期监控,了解系统的资源占用状况;
|
|
|
|
|
# 并且随着系统运行时间,需要适当增加资源预留,数值设置详见templates/kubelet-config.yaml.j2
|
|
|
|
|
# 系统预留设置基于 4c/8g 虚机,最小化安装系统服务,如果使用高性能物理机可以适当增加预留
|
|
|
|
|
# 另外,集群安装时候apiserver等资源占用会短时较大,建议至少预留1g内存
|
2019-06-25 22:55:29 +08:00
|
|
|
|
SYS_RESERVED_ENABLED: "no"
|
2020-05-23 15:16:01 +08:00
|
|
|
|
|
|
|
|
|
# haproxy balance mode
|
2019-05-28 23:46:22 +08:00
|
|
|
|
BALANCE_ALG: "roundrobin"
|
2019-05-29 20:45:25 +08:00
|
|
|
|
|
|
|
|
|
# 设置 APISERVER 地址
|
2019-06-04 13:06:11 +08:00
|
|
|
|
KUBE_APISERVER: "{%- if inventory_hostname in groups['kube-master'] -%} \
|
|
|
|
|
https://{{ inventory_hostname }}:6443 \
|
2019-05-29 20:45:25 +08:00
|
|
|
|
{%- else -%} \
|
2019-06-04 13:06:11 +08:00
|
|
|
|
{%- if groups['kube-master']|length > 1 -%} \
|
|
|
|
|
https://127.0.0.1:6443 \
|
|
|
|
|
{%- else -%} \
|
|
|
|
|
https://{{ groups['kube-master'][0] }}:6443 \
|
|
|
|
|
{%- endif -%} \
|
2019-05-29 20:45:25 +08:00
|
|
|
|
{%- endif -%}"
|
2019-06-04 13:06:11 +08:00
|
|
|
|
|
|
|
|
|
# 增加/删除 master 节点时,node 节点需要重新配置 haproxy 等
|
|
|
|
|
MASTER_CHG: "no"
|
2019-06-28 19:36:53 +08:00
|
|
|
|
|
|
|
|
|
# 离线安装 haproxy (offline|online)
|
2019-07-03 22:39:23 +08:00
|
|
|
|
INSTALL_SOURCE: "online"
|