Transparent Proxy Configuration
During transparent proxy installation Kuma under the hood is using a common structure, which can be modified in multiple different ways. By modifying it you are able to for example exclude some ports or IPs from transparent proxy redirection, configure if it should handle both IPv4 and IPv6 or just IPv4 traffic and more.
Simplified reference
This section provides a simplified version of the Full Reference. It’s useful when you want to view the entire configuration in context without diving into the specifics of each individual setting.
Schema
Below is a concise schema of the transparent proxy configuration, including default values:
# The username or UID of the user that will run kuma-dp
kumaDPUser: string
# The IP family mode used for configuring traffic redirection in the transparent proxy
ipFamilyMode: enum # default: "dualstack"
redirect:
inbound:
# Enables inbound traffic redirection
enabled: bool # default: true
# Port used for redirecting inbound traffic
port: Port # default: 15006
# List of ports to include in inbound traffic redirection
includePorts: []Port
# List of ports to exclude from inbound traffic redirection
excludePorts: []Port
# List of IP addresses to exclude from inbound traffic redirection for specific ports
excludePortsForIPs: []string
# List of UIDs to exclude from inbound traffic redirection for specific ports
excludePortsForUIDs: []string
# Inserts the redirection rule at the beginning of the chain instead of appending it
insertRedirectInsteadOfAppend: bool
outbound:
# Enables outbound traffic redirection
enabled: bool # default: true
# Port used for redirecting outbound traffic
port: Port # default: 15001
# List of ports to include in outbound traffic redirection
includePorts: []Port
# List of ports to exclude from outbound traffic redirection
excludePorts: []Port
# List of IP addresses to exclude from outbound traffic redirection for specific ports
excludePortsForIPs: []string
# List of UIDs to exclude from outbound traffic redirection for specific ports
excludePortsForUIDs: []string
# Inserts the redirection rule at the beginning of the chain instead of appending it
insertRedirectInsteadOfAppend: bool
dns:
# Enables DNS redirection in the transparent proxy
enabled: bool
# The port on which the DNS server listens
port: Port # default: 15053
# Redirect all DNS queries
captureAll: bool
# Disables conntrack zone splitting, which can prevent potential DNS issues
skipConntrackZoneSplit: bool
# Path to the system's resolv.conf file
resolvConfigPath: string # default: "/etc/resolv.conf"
vnet:
# Specifies virtual networks using the format interfaceName:CIDR
networks: []string
ebpf:
# Enables eBPF support for handling traffic redirection in the transparent proxy
enabled: bool
instanceIP: string
# The name of the environment variable containing the IP address of the instance (pod/vm) where transparent proxy will be installed
instanceIPEnvVarName: string
# The path of the BPF filesystem
bpffsPath: string # default: "/run/kuma/bpf"
# The path of cgroup2
cgroupPath: string # default: "/sys/fs/cgroup"
# Path where compiled eBPF programs and other necessary files for eBPF mode can be found
programsSourcePath: string # default: "tmp/kuma-ebpf"
# The network interface for TC eBPF programs to bind to
tcAttachIface: string
retry:
# The maximum number of retry attempts for operations
maxRetries: uint # default: 4
# The time duration to wait between retry attempts
sleepBetweenRetries: Duration # default: "2s"
iptablesExecutables:
# Custom path for the iptables executable (IPv4)
iptables: string
# Custom path for the iptables-save executable (IPv4)
iptables-save: string
# Custom path for the iptables-restore executable (IPv4)
iptables-restore: string
# Custom path for the ip6tables executable (IPv6)
ip6tables: string
# Custom path for the ip6tables-save executable (IPv6)
ip6tables-save: string
# Custom path for the ip6tables-restore executable (IPv6)
ip6tables-restore: string
log:
# Specifies the log level for iptables logging as defined by netfilter
level: enum # default: 7
# Enables logging of iptables rules for diagnostics and monitoring
enabled: bool
comments:
# Disables comments in the generated iptables rules
disabled: bool
# Time in seconds to wait for acquiring the xtables lock before failing
wait: uint # default: 5
# Time interval between retries to acquire the xtables lock in seconds
waitInterval: uint
# Drops invalid packets to avoid connection resets in high-throughput scenarios
dropInvalidPackets: bool
# Enables firewalld support to store iptables rules
storeFirewalld: bool
cniMode: bool
dryRun: bool
# Enables verbose mode with longer argument/flag names and additional comments
verbose: bool
Custom Types
Port- uint16 value greater than0Duration- string representation of time duration, that is"10s","20m","1h"etc.
Environment variables
The following structure lists the settings along with their corresponding environment variables for customization:
kumaDPUser: KUMA_TRANSPARENT_PROXY_KUMA_DP_USER
ipFamilyMode: KUMA_TRANSPARENT_PROXY_IP_FAMILY_MODE
redirect:
inbound:
enabled: KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_ENABLED
port: KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_PORT
includePorts: KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_INCLUDE_PORTS
excludePorts: KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_EXCLUDE_PORTS
excludePortsForIPs: KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_EXCLUDE_PORTS_FOR_IPS
excludePortsForUIDs: KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_EXCLUDE_PORTS_FOR_UIDS
insertRedirectInsteadOfAppend: KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_INSERT_REDIRECT_INSTEAD_OF_APPEND
outbound:
enabled: KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_ENABLED
port: KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_PORT
includePorts: KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_INCLUDE_PORTS
excludePorts: KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_EXCLUDE_PORTS
excludePortsForIPs: KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_EXCLUDE_PORTS_FOR_IPS
excludePortsForUIDs: KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_EXCLUDE_PORTS_FOR_UIDS
insertRedirectInsteadOfAppend: KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_INSERT_REDIRECT_INSTEAD_OF_APPEND
dns:
enabled: KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_ENABLED
port: KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_PORT
captureAll: KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_CAPTURE_ALL
skipConntrackZoneSplit: KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_SKIP_CONNTRACK_ZONE_SPLIT
resolvConfigPath: KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_RESOLV_CONFIG_PATH
vnet:
networks: KUMA_TRANSPARENT_PROXY_REDIRECT_VNET_NETWORKS
ebpf:
enabled: KUMA_TRANSPARENT_PROXY_EBPF_ENABLED
instanceIP: KUMA_TRANSPARENT_PROXY_EBPF_INSTANCE_IP
instanceIPEnvVarName: KUMA_TRANSPARENT_PROXY_EBPF_INSTANCE_IP_ENV_VAR_NAME
bpffsPath: KUMA_TRANSPARENT_PROXY_EBPF_BPFFS_PATH
cgroupPath: KUMA_TRANSPARENT_PROXY_EBPF_CGROUP_PATH
programsSourcePath: KUMA_TRANSPARENT_PROXY_EBPF_PROGRAMS_SOURCE_PATH
tcAttachIface: KUMA_TRANSPARENT_PROXY_EBPF_TC_ATTACH_IFACE
retry:
maxRetries: KUMA_TRANSPARENT_PROXY_RETRY_MAX_RETRIES
sleepBetweenRetries: KUMA_TRANSPARENT_PROXY_RETRY_SLEEP_BETWEEN_RETRIES
iptablesExecutables: KUMA_TRANSPARENT_PROXY_IPTABLES_EXECUTABLES
log:
enabled: KUMA_TRANSPARENT_PROXY_LOG_ENABLED
level: KUMA_TRANSPARENT_PROXY_LOG_LEVEL
comments:
disabled: KUMA_TRANSPARENT_PROXY_COMMENTS_DISABLED
wait: KUMA_TRANSPARENT_PROXY_WAIT
waitInterval: KUMA_TRANSPARENT_PROXY_WAIT_INTERVAL
dropInvalidPackets: KUMA_TRANSPARENT_PROXY_DROP_INVALID_PACKETS
storeFirewalld: KUMA_TRANSPARENT_PROXY_STORE_FIREWALLD
cniMode: KUMA_TRANSPARENT_PROXY_CNI_MODE
dryRun: KUMA_TRANSPARENT_PROXY_DRY_RUN
verbose: KUMA_TRANSPARENT_PROXY_VERBOSE
CLI flags
This structure outlines the settings and their associated CLI flags for modification:
kumaDPUser: --kuma-dp-user
ipFamilyMode: --ip-family-mode
redirect:
dns:
enabled: --redirect-dns
port: --redirect-dns-port
captureAll: --redirect-all-dns-traffic
skipConntrackZoneSplit: --skip-dns-conntrack-zone-split
resolvConfigPath: # can't be modified via CLI flag
inbound:
enabled: --redirect-inbound
port: --redirect-inbound-port
includePorts: # can't be modified via CLI flag
excludePorts: --exclude-inbound-ports
excludePortsForIPs: --exclude-inbound-ips
excludePortsForUIDs: # can't be modified via CLI flag
insertRedirectInsteadOfAppend: --redirect-inbound-insert-instead-of-append
outbound:
enabled: # can't be modified via CLI flag
port: --redirect-outbound-port
includePorts: # can't be modified via CLI flag
excludePorts: --exclude-outbound-ports
excludePortsForIPs: --exclude-outbound-ips
excludePortsForUIDs: --exclude-outbound-ports-for-uids
insertRedirectInsteadOfAppend: --redirect-outbound-insert-instead-of-append
vnet:
networks: --vnet
ebpf:
enabled: --ebpf-enabled
instanceIP: --ebpf-instance-ip
instanceIPEnvVarName: # can't be modified via CLI flag
bpffsPath: --ebpf-bpffs-path
cgroupPath: --ebpf-cgroup-path
programsSourcePath: --ebpf-programs-source-path
tcAttachIface: --ebpf-tc-attach-iface
retry:
maxRetries: --max-retries
sleepBetweenRetries: --sleep-between-retries
iptablesExecutables: --iptables-executables
log:
enabled: --iptables-logs
level: # can't be modified via CLI flag
comments:
disabled: --disable-comments
wait: --wait
waitInterval: --wait-interval
dropInvalidPackets: --drop-invalid-packets
storeFirewalld: --store-firewalld
cniMode: # can't be modified via CLI flag
dryRun: --dry-run
verbose: --verbose
Default values
Here is a configuration that only shows the settings with their default values:
ipFamilyMode: "dualstack"
redirect:
inbound:
enabled: true
port: 15006
outbound:
enabled: true
port: 15001
dns:
port: 15053
resolvConfigPath: "/etc/resolv.conf"
ebpf:
bpffsPath: "/run/kuma/bpf"
cgroupPath: "/sys/fs/cgroup"
programsSourcePath: "/tmp/kuma-ebpf"
retry:
maxRetries: 4
sleepBetweenRetries: "2s"
log:
level: 7
wait: 5
Full reference
-
kumaDPUserThe username or UID of the user that will run
kuma-dpIf this value is not provided, the system will default to using the UID
5678or the usernamekuma-dpType stringCLI Flag --kuma-dp-userEnvironment Variable KUMA_TRANSPARENT_PROXY_KUMA_DP_USERControl Plane Runtime Configuration Field runtime.kubernetes.injector.sidecarContainer.uidEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_UIDExamples
kumactl install transparent-proxy --kuma-dp-user bobKUMA_TRANSPARENT_PROXY_KUMA_DP_USER="5679" kumactl install transparent-proxy -
ipFamilyModeThe IP family mode used for configuring traffic redirection in the transparent proxy
Type enumDefault Value dualstackValues dualstack,ipv4CLI Flag --ip-family-modeEnvironment Variable KUMA_TRANSPARENT_PROXY_IP_FAMILY_MODEKubernetes Annotation kuma.io/transparent-proxying-ip-family-modeControl Plane Runtime Configuration Field runtime.kubernetes.injector.sidecarContainer.ipFamilyModeEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_IP_FAMILY_MODE -
redirect-
inbound-
enabledEnables inbound traffic redirection
Type boolDefault Value trueCLI Flag --redirect-inboundEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_ENABLED -
portPort used for redirecting inbound traffic
Type PortDefault Value 15006CLI Flag --redirect-inbound-portEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_PORTControl Plane Runtime Configuration Field runtime.kubernetes.injector.sidecarContainer.redirectPortInboundEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_REDIRECT_PORT_INBOUND -
includePortsList of ports to include in inbound traffic redirection
This option cannot be used together with
redirect.inbound.excludePorts. If both are specified,redirect.inbound.includePortswill take precedenceType []PortEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_INCLUDE_PORTS -
excludePortsList of ports to exclude from inbound traffic redirection
This option cannot be used together with
redirect.inbound.includePorts. If both are specified,redirect.inbound.includePortswill take precedence.Type []PortCLI Flag --exclude-inbound-portsEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_EXCLUDE_PORTSKubernetes Annotation traffic.kuma.io/exclude-inbound-portsControl Plane Runtime Configuration Field runtime.kubernetes.injector.sidecarTraffic.excludeInboundPortsEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_TRAFFIC_EXCLUDE_INBOUND_PORTS -
excludePortsForIPsList of IP addresses to exclude from inbound traffic redirection for specific ports
Type []stringFormat ip[,...]CLI Flag --exclude-inbound-ipsEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_EXCLUDE_PORTS_FOR_IPSKubernetes Annotation traffic.kuma.io/exclude-inbound-ipsControl Plane Runtime Configuration Field runtime.kubernetes.injector.sidecarTraffic.excludeInboundIPsEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_TRAFFIC_EXCLUDE_INBOUND_IPSThis CLI flag can be repeated. For example:
kumactl install transparent-proxy \ --exclude-outbound-ips "10.0.0.1,172.1.0.0/24" \ --exclude-outbound-ips "fe80::/10" -
excludePortsForUIDsList of UIDs to exclude from inbound traffic redirection for specific ports
Type []stringEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_EXCLUDE_PORTS_FOR_UIDS -
insertRedirectInsteadOfAppendInserts the redirection rule at the beginning of the chain instead of appending it
Details: For inbound traffic, by default, the last applied iptables rule in the
PREROUTINGchain of thenattable redirects traffic to our custom chain (KUMA_MESH_INBOUND_REDIRECT) for handling transparent proxying. If there is an existing rule in this chain that redirects traffic to another chain, our default behavior of appending the rule would cause it to be added after the existing one, making our rule ineffective. Specifying this flag changes the behavior to insert the rule at the beginning of the chain, ensuring our rule takes precedenceNote that if the
redirect.vnetsetting is also specified, the default behavior is already to insert the rule, so using this setting will not change that behaviorType boolDefault Value falseCLI Flag --redirect-inbound-insert-instead-of-appendEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_INBOUND_INSERT_REDIRECT_INSTEAD_OF_APPEND
-
-
outbound-
enabledEnables outbound traffic redirection
Type boolDefault Value trueEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_ENABLED -
portPort used for redirecting outbound traffic
Type PortDefault Value 15001CLI Flag --redirect-outbound-portEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_PORTControl Plane Runtime Configuration Field runtime.kubernetes.injector.sidecarContainer.redirectPortOutboundEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_REDIRECT_PORT_OUTBOUND -
includePortsList of ports to include in outbound traffic redirection
This option cannot be used together with
redirect.outbound.excludePorts. If both are specified,redirect.outbound.includePortswill take precedence.Type []PortEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_INCLUDE_PORTS -
excludePortsList of ports to exclude from outbound traffic redirection
This option cannot be used together with
redirect.outbound.includePorts. If both are specified,redirect.outbound.includePortswill take precedence.Type []PortCLI Flag --exclude-outbound-portsEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_EXCLUDE_PORTSKubernetes Annotation traffic.kuma.io/exclude-outbound-portsControl Plane Runtime Configuration Field runtime.kubernetes.injector.sidecarTraffic.excludeOutboundPortsEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_TRAFFIC_EXCLUDE_OUTBOUND_PORTS -
excludePortsForIPsList of IP addresses to exclude from outbound traffic redirection for specific ports.
Type []stringFormat ip[,...]CLI Flag --exclude-outbound-ipsEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_EXCLUDE_PORTS_FOR_IPSKubernetes Annotation traffic.kuma.io/exclude-outbound-ipsControl Plane Runtime Configuration Field runtime.kubernetes.injector.sidecarTraffic.excludeOutboundIPsEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_TRAFFIC_EXCLUDE_OUTBOUND_IPS -
excludePortsForUIDsList of UIDs to exclude from outbound traffic redirection for specific ports
Type []stringFormat [[protocol:][ports:]uids][;...]CLI Flag --exclude-outbound-ports-for-uidsEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_EXCLUDE_PORTS_FOR_UIDSKubernetes Annotation traffic.kuma.io/exclude-outbound-ports-for-uidsExamples
-
Exclude outbound TCP and UDP traffic to all ports for processes owned by user with UID
1000:kumactl install transparent-proxy \ --exclude-outbound-ports-for-uids "1000" -
Exclude outbound UDP traffic to all ports for processes owned by user with UID
1000:kumactl install transparent-proxy \ --exclude-outbound-ports-for-uids "udp:*:1000" -
Exclude outbound TCP traffic to port
22and ports80–88for processes owned by users with UIDs in the range1000–1002:kumactl install transparent-proxy \ --exclude-outbound-ports-for-uids "tcp:22,80-88:1000-1002" -
Exclude outbound TCP and UDP traffic to all ports for processes owned by users with UIDs in the range
1000–1100, and exclude outbound UDP traffic to all ports for processes owned by user with UID2000:kumactl install transparent-proxy \ --exclude-outbound-ports-for-uids "1000-1100;udp:*:2000"kumactl install transparent-proxy \ --exclude-outbound-ports-for-uids "1000-1100" \ --exclude-outbound-ports-for-uids "udp:*:2000"
-
-
insertRedirectInsteadOfAppendInserts the redirection rule at the beginning of the chain instead of appending it
Details: For outbound traffic, by default, the last applied iptables rule in the
OUTPUTchain of thenattable redirects traffic to our custom chain (KUMA_MESH_OUTBOUND_REDIRECT), where it is processed for transparent proxying. However, if there is an existing rule in this chain that already redirects traffic to another chain, our default behavior of appending the rule will cause our rule to be added after the existing one, effectively ignoring it. When this flag is specified, it changes the behavior from appending to inserting the rule at the beginning of the chain, ensuring that our iptables rule takes precedenceType boolDefault Value falseCLI Flag --redirect-outbound-insert-instead-of-appendEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_OUTBOUND_INSERT_REDIRECT_INSTEAD_OF_APPEND
-
-
-
dns-
enabledEnables redirection of DNS queries to the DNS server managed by Kuma, listening on the port specified in the
redirect.dns.portsettingWhen
redirect.dns.captureAllis disabled, only queries directed to servers listed in the file specified viaredirect.dns.resolvConfigPath) will be redirected. Ifredirect.dns.captureAllis enabled, all DNS queries will be redirected, regardless of the target DNS serverType boolDefault Value trueEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_ENABLEDControl Plane Runtime Configuration Field runtime.kubernetes.injector.builtinDNS.enabledEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_BUILTIN_DNS_ENABLED -
portThe port where the DNS server managed by Kuma is listening
Type PortDefault Value 15053CLI Flag --redirect-dns-portEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_PORTControl Plane Runtime Configuration Field runtime.kubernetes.injector.builtinDNS.portEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_BUILTIN_DNS_PORT -
captureAllRedirect all DNS traffic to the DNS server managed by Kuma, listening on the port specified in the
redirect.dns.portsettingThis setting requires
redirect.dns.enabled, which is disabled by default. However, using the--redirect-all-dns-trafficflag automatically enables it. Note that combining--redirect-all-dns-trafficwith--redirect-dnsis incorrect and will result in an error. In all other cases, ensureredirect.dns.enabledis explicitly enabled via the appropriate environment variable or in theJSON/YAMLconfiguration.Type boolDefault Value falseCLI Flag --redirect-all-dns-trafficEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_CAPTURE_ALL -
skipConntrackZoneSplitDisables conntrack zone splitting, which can prevent potential DNS issues
Details: The conntrack zone splitting feature is used to avoid DNS resolution errors when applications make numerous DNS UDP requests. Normally, we separate conntrack zones to ensure proper handling of DNS traffic: Zone 2 handles DNS packets between the application and the local proxy, while Zone 1 manages packets between the proxy and upstream DNS resolvers. Disabling this feature should only be done if necessary, for example, in environments where custom iptables rules are already manipulating DNS traffic (for example, inside Docker containers in custom networks when redirecting all DNS traffic [
redirect.dns.captureAllis enabled])Type boolDefault Value falseCLI Flag --skip-dns-conntrack-zone-splitEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_SKIP_CONNTRACK_ZONE_SPLIT -
resolvConfigPathSpecifies the path to the
resolv.conffile used to parse the DNS servers for redirecting DNS queriesThis setting is taken into account only when
redirect.dns.captureAllis not enabled.Type stringDefault Value /etc/resolv.confEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_DNS_RESOLV_CONFIG_PATH
-
-
vnet-
networksSpecifies virtual networks using the format
interfaceName:CIDRAllows matching traffic on specific network interfacesExamples:
docker0:172.17.0.0/16br+:172.18.0.0/16(matches any interface with name starting withbr)iface:::1/64(for IPv6)
Type []stringCLI Flag --vnetEnvironment Variable KUMA_TRANSPARENT_PROXY_REDIRECT_VNET_NETWORKS
-
-
ebpfeBPF implementation is experimental. Use with caution
-
enabledEnables eBPF support for handling traffic redirection in the transparent proxy
Type boolDefault Value falseCLI Flag --ebpf-enabledEnvironment Variable KUMA_TRANSPARENT_PROXY_EBPF_ENABLEDKubernetes Annotation kuma.io/transparent-proxying-ebpfControl Plane Runtime Configuration Field runtime.kubernetes.injector.ebpf.enabledEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_EBPF_ENABLED -
instanceIPIP address of the instance (pod/vm) where transparent proxy will be installed
Mutually exclusive with
ebpf.instanceIPEnvVarName.Type stringCLI Flag --ebpf-instance-ipEnvironment Variable KUMA_TRANSPARENT_PROXY_EBPF_INSTANCE_IP -
instanceIPEnvVarNameThe name of the environment variable containing the IP address of the instance (pod/vm) where transparent proxy will be installed
Mutually exclusive with
ebpf.instanceIP.Type stringEnvironment Variable KUMA_TRANSPARENT_PROXY_EBPF_INSTANCE_IP_ENV_VAR_NAMEKubernetes Annotation kuma.io/transparent-proxying-ebpf-instance-ip-env-var-nameControl Plane Runtime Configuration Field runtime.kubernetes.injector.ebpf.instanceIPEnvVarNameEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_EBPF_INSTANCE_IP_ENV_VAR_NAME -
bpffsPathThe path of the BPF filesystem
Type stringDefault Value /run/kuma/bpfCLI Flag --ebpf-bpffs-pathEnvironment Variable KUMA_TRANSPARENT_PROXY_EBPF_BPFFS_PATHKubernetes Annotation kuma.io/transparent-proxying-ebpf-bpf-fs-pathControl Plane Runtime Configuration Field runtime.kubernetes.injector.ebpf.bpffsPathEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_EBPF_BPFFS_PATH -
cgroupPathThe path of cgroup2
Type stringDefault Value /sys/fs/cgroupCLI Flag --ebpf-cgroup-pathEnvironment Variable KUMA_TRANSPARENT_PROXY_EBPF_CGROUP_PATHKubernetes Annotation kuma.io/transparent-proxying-ebpf-cgroup-pathControl Plane Runtime Configuration Field runtime.kubernetes.injector.ebpf.cgroupPathEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_EBPF_CGROUP_PATH -
programsSourcePathPath where compiled eBPF programs and other necessary files for eBPF mode can be found
Type stringDefault Value /tmp/kuma-ebpfCLI Flag --ebpf-programs-source-pathEnvironment Variable KUMA_TRANSPARENT_PROXY_EBPF_PROGRAMS_SOURCE_PATHKubernetes Annotation kuma.io/transparent-proxying-ebpf-programs-source-pathControl Plane Runtime Configuration Field runtime.kubernetes.injector.ebpf.programSourcePathEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_EBPF_PROGRAMS_SOURCE_PATH -
tcAttachIfaceThe network interface for TC eBPF programs to bind to. If not provided, it will be automatically determined
Type stringCLI Flag --ebpf-tc-attach-ifaceEnvironment Variable KUMA_TRANSPARENT_PROXY_EBPF_TC_ATTACH_IFACEKubernetes Annotation kuma.io/transparent-proxying-ebpf-tc-attach-ifaceControl Plane Runtime Configuration Field runtime.kubernetes.injector.ebpf.tcAttachIfaceEnvironment Variable KUMA_RUNTIME_KUBERNETES_INJECTOR_EBPF_TC_ATTACH_IFACE
-
-
retry-
maxRetriesThe maximum number of retry attempts for operations
Type uintDefault Value 4CLI Flag --max-retriesEnvironment Variable KUMA_TRANSPARENT_PROXY_RETRY_MAX_RETRIES -
sleepBetweenRetriesThe time duration to wait between retry attempts
Type DurationDefault Value 2sCLI Flag --sleep-between-retriesEnvironment Variable KUMA_TRANSPARENT_PROXY_RETRY_SLEEP_BETWEEN_RETRIES
-
-
iptablesExecutablesSpecifies custom paths for iptables executables
You must provide all three executables for each IP version you want to customize (IPv4 or IPv6), meaning if you configure one for IPv6 (for example,
ip6tables), you must also specifyip6tables-saveandip6tables-restore. Partial configurations for either IPv4 or IPv6 are not allowed.Provided paths are not extensively validated, so ensure you specify correct paths and that the executables are actual iptables binaries to avoid misconfigurations and unexpected behavior.
Configuration values can be set through a combination of sources: config file (via
--configor--config-file), environment variables, and the--iptables-executablesflag. For example, you can specifyip6tablesin the config file,ip6tables-saveas an environment variable, andip6tables-restorevia the--iptables-executablesflag.Type objectCLI Flag --iptables-executablesEnvironment Variable KUMA_TRANSPARENT_PROXY_IPTABLES_EXECUTABLES -
log-
enabledDetermines whether iptables rules logging is activated. When
true, each packet matching an iptables rule will have its details logged, aiding in diagnostics and monitoring of packet flowsType boolDefault Value falseCLI Flag --iptables-logsEnvironment Variable KUMA_TRANSPARENT_PROXY_LOG_ENABLEDKubernetes Annotation traffic.kuma.io/iptables-logs -
levelSpecifies the log level for iptables logging as defined by netfilter. This level controls the verbosity and detail of the log entries for matching packets. Higher values increase the verbosity. The exact behavior can depend on the system’s syslog configuration
Available log levels:
0- emergency (system is unusable)1- alert (action must be taken immediately)2- critical (critical conditions)3- error (error conditions)4- warning (warning conditions)5- notice (normal but significant condition)6- info (informational)7- debug (debug-level messages)
Type enumDefault Value 7Values 0,1,2,3,4,5,6,7Environment Variable KUMA_TRANSPARENT_PROXY_LOG_LEVEL
-
-
comments-
disabledDisables the addition of comments to iptables rules
Disabling comments is strongly discouraged, as they are essential for properly uninstalling the transparent proxy. If comments are disabled, the
kumactl uninstall transparent-proxycommand will not function, and you’ll need to manually remove the related iptables rules when necessary.Type boolDefault Value falseCLI Flag --disable-commentsEnvironment Variable KUMA_TRANSPARENT_PROXY_COMMENTS_DISABLED
-
-
waitTime in seconds to wait for acquiring the xtables lock before failing. Value
0means wait indefinitelyType uintDefault Value 5CLI Flag --waitEnvironment Variable KUMA_TRANSPARENT_PROXY_WAIT -
waitIntervalTime interval between retries to acquire the xtables lock in seconds
Type uintDefault Value 0CLI Flag --wait-intervalEnvironment Variable KUMA_TRANSPARENT_PROXY_WAIT_INTERVAL -
dropInvalidPacketsDrops invalid packets to avoid connection resets in high-throughput scenarios
Details: This setting enables dropping of packets in invalid states, improving application stability by preventing them from reaching the backend. This is particularly beneficial during high-throughput requests where out-of-order packets might bypass DNAT
Note that enabling this flag may introduce slight performance overhead. Weigh the trade-off between connection stability and performance before enabling it.
Type boolDefault Value falseCLI Flag --drop-invalid-packetsEnvironment Variable KUMA_TRANSPARENT_PROXY_DROP_INVALID_PACKETSKubernetes Annotation traffic.kuma.io/drop-invalid-packets -
storeFirewalldEnables firewalld support to store iptables rules
Type boolDefault Value falseCLI Flag --store-firewalldEnvironment Variable KUMA_TRANSPARENT_PROXY_STORE_FIREWALLD -
cniModeType boolDefault Value falseEnvironment Variable KUMA_TRANSPARENT_PROXY_CNI_MODE -
dryRunEnables dry-run mode
Type boolDefault Value falseCLI Flag --dry-runEnvironment Variable KUMA_TRANSPARENT_PROXY_DRY_RUN -
verboseEnables verbose mode with longer argument/flag names and additional comments
Type boolDefault Value falseCLI Flag --verboseEnvironment Variable KUMA_TRANSPARENT_PROXY_VERBOSE