fix: ipvs-connection-timeout-issue

pull/708/head
jiang_gw 2019-09-03 12:39:07 +08:00 committed by jmgao
parent ae9060aa06
commit 4e81cb12a9
3 changed files with 9 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# 离线安装系统软件包 (offline|online)
INSTALL_SOURCE: "online"
# 默认使用kube-proxy的 'iptables' 模式,可选 'ipvs' 模式(experimental)
PROXY_MODE: "ipvs"

View File

@ -42,6 +42,7 @@
# 设置系统参数for k8s
# 消除docker info 警告WARNING: bridge-nf-call-ip[6]tables is disabled
# https://success.docker.com/article/ipvs-connection-timeout-issue 缩短keepalive_time超时时间为600s
- name: 设置系统参数
template: src=95-k8s-sysctl.conf.j2 dest=/etc/sysctl.d/95-k8s-sysctl.conf

View File

@ -10,3 +10,8 @@ net.netfilter.nf_conntrack_max=1000000
vm.swappiness = 0
vm.max_map_count=655360
fs.file-max=6553600
{% if PROXY_MODE == "ipvs" %}
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 10
{% endif %}