官方文档地址:https://kubernetes.io/zh/docs/reference/command-line-tools-reference/kube-proxy/
共 51 个配置选项。
If true, adds the file directory to the header
日志重定向到标准错误和文件
Kube-proxy 监听的地址,默认就是 0.0.0.0
如果为 true,就会清理 iptables 和 ipvs 然后退出
Pod 的IP地址范围
配置文件的路径
多久从 kube-apiserver 刷新一次配置,必须大于0,默认为 15分钟。
每个 CPU 的最大 NAT 连接数量,0 代表无限,默认是 32768
最小的 NAT 连接数量,默认 131072 ,--conntrack-max-per-core 为 0 时,这个参数将无效
TCP 连接的 NAT 超时时间,即 TCP 处于 CLOSE_WAIT 状态的时间,默认为 1小时
在 established 状态的超时时间,默认 24 小时。
特性开关
健康检查绑定的 IP 地址
健康检查的端口,默认 10256,为 0 则禁用。
如果不为空,则覆盖时间的主机名
取值必须在 [0, 31]之间 (default 14)。
如果使用纯 iptables 代理,标记需要SNAT的包的fwmark空间的位。
最小的时间间隔去刷新 endpoints 和 service 的规则,比如'5s', '1m', '2h22m'
iptables 规则刷新的最大时间间隔,默认 30s。
一个逗号分隔的CIDR列表,ipvs代理在清理ipvs规则时不应接触该列表。
Itvs最小的时间间隔去刷新 endpoints 和 service 的规则,比如'5s', '1m', '2h22m'
当代理模式是 ipvs 时使用 ipvs 调度
开启静态 ARP,arp_ignore 为 1 , arp_announce 为 2
Ipvs 规则刷新的最大时间间隔,默认 30s。
默认 10,与 kube-apiserver 交流。
请求 apiserver 的数据类型,默认 application/vnd.kubernetes.protobuf
与kubernetes apiserver交谈时使用的QPS,默认 5。
QPS:每秒查询率QPS是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准,在因特网上,作为域名系统服务器的机器的性能经常用每秒查询率来衡量。
kubeconfig 配置地址,要给予kube-proxy 一定的 apiserver 的权限。
默认 0,当处于哪行时,开始记录日志
日志目录
日志文件
日志文件最大大小
日志过多少时间就刷到文件中,默认 5 秒。
错误日志传到标准错误,而不是文件,默认为true
If using the pure iptables proxy, SNAT all traffic sent via Service cluster IPs (this not commonly needed)
kube-apiserver 的地址,这个值会覆盖 kubeconfig 中的地址。
metrics 绑定的地址
metrics 绑定的端口,默认 10249
NodePorts 可以使用的地址,为 空列表则表示所有集群中的节点地址。
[-1000, 1000] (default -999),进程点数,在发生内存溢出时,linux 会选择杀死哪些进程,点数越大,这个进程越有可能被杀死
If true enables profiling via web interface on /debug/pprof handler
'userspace' (older) or 'iptables' (faster) or 'ipvs'
主机上的端口范围
If true, avoid header prefixes in the log messages
If true, avoid headers when opening log files
logs at or above this threshold go to stderr (default 2)
How long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxy-mode=userspace (default 250ms)
打印版本退出
comma-separated list of pattern=N settings for file-filtered logging
If set, write the default configuration values to this file and exit.