Professional Documents
Culture Documents
kube-proxy [flags]
Options
--add_dir_header
If true, adds the file directory to the header of the log messages
--alsologtostderr
log to standard error as well as files (no effect when -logtostderr=true)
--bind-address-hard-fail
If true kube-proxy will treat failure to bind to a port as fatal and exit
--cleanup
If true cleanup iptables and ipvs rules and exit.
--cluster-cidr string
The CIDR range of the pods in the cluster. (For dual-stack clusters, this can be a
comma-separated dual-stack pair of CIDR ranges.). When --detect-local-mode is set
to ClusterCIDR, kube-proxy will consider traffic to be local if its source IP is in
this range. (Otherwise it is not used.) This parameter is ignored if a config file
is specified by --config.
--config string
The path to the configuration file.
--conntrack-tcp-be-liberal
Enable liberal mode for tracking TCP packets by setting nf_conntrack_tcp_be_liberal
to 1
--conntrack-udp-timeout duration
Idle timeout for UNREPLIED UDP connections (0 to leave as-is)
--conntrack-udp-timeout-stream duration
Idle timeout for ASSURED UDP connections (0 to leave as-is)
--detect-local-mode LocalMode
Mode to use to detect local traffic. This parameter is ignored if a config file is
specified by --config.
-h, --help
help for kube-proxy
--hostname-override string
If non-empty, will be used as the name of the Node that kube-proxy is running on.
If unset, the node name is assumed to be the same as the node's hostname.
--init-only
If true, perform any initialization steps that must be done with full root
privileges, and then exit. After doing this, you can run kube-proxy again with only
the CAP_NET_ADMIN capability.
--ipvs-exclude-cidrs strings
A comma-separated list of CIDRs which the ipvs proxier should not touch when
cleaning up IPVS rules.
--ipvs-min-sync-period duration
The minimum period between IPVS rule resyncs (e.g. '5s', '1m', '2h22m'). A value of
0 means every Service or EndpointSlice change will result in an immediate IPVS
resync.
--ipvs-scheduler string
The ipvs scheduler type when proxy mode is ipvs
--ipvs-strict-arp
Enable strict ARP by setting arp_ignore to 1 and arp_announce to 2
--ipvs-tcp-timeout duration
The timeout for idle IPVS TCP connections, 0 to leave as-is. (e.g. '5s', '1m',
'2h22m').
--ipvs-tcpfin-timeout duration
The timeout for IPVS TCP connections after receiving a FIN packet, 0 to leave as-
is. (e.g. '5s', '1m', '2h22m').
--ipvs-udp-timeout duration
The timeout for IPVS UDP packets, 0 to leave as-is. (e.g. '5s', '1m', '2h22m').
--kubeconfig string
Path to kubeconfig file with authorization information (the master location can be
overridden by the master flag).
--log-flush-frequency duration Default: 5s
Maximum number of seconds between log flushes
--log_dir string
If non-empty, write log files in this directory (no effect when -logtostderr=true)
--log_file string
If non-empty, use this log file (no effect when -logtostderr=true)
--masquerade-all
If using the iptables or ipvs proxy mode, SNAT all traffic sent via Service cluster
IPs. This may be required with some CNI plugins.
--master string
The address of the Kubernetes API server (overrides any value in kubeconfig)
--nodeport-addresses strings
A list of CIDR ranges that contain valid node IPs. If set, connections to NodePort
services will only be accepted on node IPs in one of the indicated ranges. If
unset, NodePort connections will be accepted on all local IPs. This parameter is
ignored if a config file is specified by --config.
--one_output
If true, only write logs to their native severity level (vs also writing to each
lower severity level; no effect when -logtostderr=true)
--pod-bridge-interface string
A bridge interface name. When --detect-local-mode is set to BridgeInterface, kube-
proxy will consider traffic to be local if it originates from this bridge.
--pod-interface-name-prefix string
An interface name prefix. When --detect-local-mode is set to InterfaceNamePrefix,
kube-proxy will consider traffic to be local if it originates from any interface
whose name begins with this prefix.
--profiling
If true enables profiling via web interface on /debug/pprof handler. This parameter
is ignored if a config file is specified by --config.
--proxy-mode ProxyMode
Which proxy mode to use: on Linux this can be 'iptables' (default) or 'ipvs'. On
Windows the only supported value is 'kernelspace'.This parameter is ignored if a
config file is specified by --config.
--show-hidden-metrics-for-version string
The previous version for which you want to show hidden metrics. Only the previous
minor version is meaningful, other values will not be allowed. The format is
<major>.<minor>, e.g.: '1.16'. The purpose of this format is make sure you have the
opportunity to notice if the next release hides additional metrics, rather than
being surprised when they are permanently removed in the release after that. This
parameter is ignored if a config file is specified by --config.
--skip_headers
If true, avoid header prefixes in the log messages
--skip_log_headers
If true, avoid headers when opening log files (no effect when -logtostderr=true)
--version version[=true]
--version, --version=raw prints version information and quits; --version=vX.Y.Z...
sets the reported version
--vmodule pattern=N,...
comma-separated list of pattern=N settings for file-filtered logging (only works
for text log format)
--write-config-to string
If set, write the default configuration values to this file and exit.
If you plan to report an issue with this page, mention that the page is auto-
generated in your issue description. The fix may need to happen elsewhere in the
Kubernetes project.
Feedback
Was this page helpful?
Last modified December 14, 2023 at 8:49 AM PST: Update component reference for
v1.29 (519eec1bf6)
Documentation
Blog
Training
Partners
Community
Case Studies
© 2024 The Kubernetes Authors | Documentation Distributed under CC BY 4.0
Copyright © 2024 The Linux Foundation ®. All rights reserved. The Linux Foundation
has registered trademarks and uses trademarks. For a list of trademarks of The
Linux Foundation, please see our Trademark Usage page
ICP license: 京 ICP 备 17074266 号-3