2018-07-09 18:18:32 +08:00
|
|
|
|
# 默认使用kube-proxy的 'iptables' 模式,可选 'ipvs' 模式(experimental)
|
|
|
|
|
PROXY_MODE: "iptables"
|
|
|
|
|
|
2019-01-10 23:51:50 +08:00
|
|
|
|
# 基础容器镜像
|
|
|
|
|
SANDBOX_IMAGE: "mirrorgooglecontainers/pause-amd64:3.1"
|
|
|
|
|
#SANDBOX_IMAGE: "registry.access.redhat.com/rhel7/pod-infrastructure:latest"
|
|
|
|
|
|
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等)预留的资源量
|
2019-05-22 00:06:21 +08:00
|
|
|
|
KUBE_RESERVED_ENABLED: "yes"
|
2019-04-10 23:49:49 +08:00
|
|
|
|
KUBE_RESERVED: "cpu=200m,memory=500Mi,ephemeral-storage=1Gi"
|
2019-06-12 21:31:06 +08:00
|
|
|
|
SYS_RESERVED: "cpu=200m,memory=500Mi,ephemeral-storage=1Gi"
|
2019-04-10 23:49:49 +08:00
|
|
|
|
|
|
|
|
|
# 配置kubelet的hard eviction条件
|
2019-06-12 21:31:06 +08:00
|
|
|
|
HARD_EVICTION: "memory.available<500Mi,nodefs.available<10%"
|
2019-05-28 23:46:22 +08:00
|
|
|
|
|
|
|
|
|
# node 请求 apiserver 负载均衡算法,常见如下:
|
|
|
|
|
# "roundrobin": 基于服务器权重的轮询
|
|
|
|
|
# "leastconn": 基于服务器最小连接数
|
|
|
|
|
# "source": 基于请求源IP地址
|
|
|
|
|
# "uri": 基于请求的URI
|
|
|
|
|
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"
|