HTTP proxy configuration

Related Documentation

Kong Operator is built with Go and respects the standard proxy environment variables defined by Go’s ProxyFromEnvironment. This allows you to route the KO’s outbound HTTP(S) traffic through a corporate proxy or forward proxy.

Supported environment variables

Use the following environment variables to configure the proxying:

Variable

Description

HTTP_PROXY Proxy URL to use for outbound HTTP requests.
HTTPS_PROXY Proxy URL to use for outbound HTTPS requests.
NO_PROXY Comma-separated list of hosts, IP addresses, or CIDR ranges that should bypass the proxy.

The lowercase variants (http_proxy, https_proxy, no_proxy) are also supported. If both uppercase and lowercase variants are set, the uppercase variant takes precedence.

NO_PROXY format

The NO_PROXY variable accepts a comma-separated list of entries. Each entry can be:

  • A hostname (e.g. example.com) — matches that host exactly.
  • A domain with a leading dot (e.g. .example.com) — matches the domain and all subdomains.
  • An IP address (e.g. 10.0.0.1).
  • A CIDR range (e.g. 10.0.0.0/8).
  • * — bypasses the proxy for all requests.

Configure proxy variables in Helm

Set the environment variables through Helm values:

customEnv:
  HTTP_PROXY: "http://proxy.example.com:3128"
  HTTPS_PROXY: "http://proxy.example.com:3128"
  NO_PROXY: "10.0.0.0/8,127.0.0.1,localhost,.svc,.cluster.local"

Make sure to include Kubernetes internal addresses (such as .svc and .cluster.local) in NO_PROXY so that in-cluster communication is not routed through the proxy.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!