kubeasz/roles/kube-node/templates/kube-proxy-config.yaml.j2

29 lines
947 B
Plaintext
Raw Normal View History

2021-01-10 21:25:05 +08:00
kind: KubeProxyConfiguration
apiVersion: kubeproxy.config.k8s.io/v1alpha1
2022-01-05 12:43:03 +08:00
bindAddress: 0.0.0.0
2021-01-10 21:25:05 +08:00
clientConnection:
kubeconfig: "/etc/kubernetes/kube-proxy.kubeconfig"
2022-06-28 19:59:50 +08:00
# 根据clusterCIDR 判断集群内部和外部流量配置clusterCIDR选项后kube-proxy 会对访问 Service IP 的请求做 SNAT
2021-01-10 21:25:05 +08:00
clusterCIDR: "{{ CLUSTER_CIDR }}"
conntrack:
maxPerCore: 32768
min: 131072
tcpCloseWaitTimeout: 1h0m0s
tcpEstablishedTimeout: 24h0m0s
2022-01-05 12:43:03 +08:00
healthzBindAddress: 0.0.0.0:10256
2022-06-28 19:59:50 +08:00
# hostnameOverride 值必须与 kubelet 的对应一致,否则 kube-proxy 启动后会找不到该 Node从而不会创建任何 iptables 规则
2023-01-15 21:41:45 +08:00
hostnameOverride: "{{ K8S_NODENAME }}"
2022-01-05 12:43:03 +08:00
metricsBindAddress: 0.0.0.0:10249
2021-01-10 21:25:05 +08:00
mode: "{{ PROXY_MODE }}"
2023-08-01 18:58:57 +08:00
{% if PROXY_MODE == "ipvs" %}
ipvs:
excludeCIDRs: null
minSyncPeriod: 0s
scheduler: ""
strictARP: {{ ENABLE_IPVS_STRICT_ARP }}
syncPeriod: 30s
tcpFinTimeout: 0s
tcpTimeout: 0s
udpTimeout: 0s
{% endif %}