Bruno Schaatsbergen website Mastodon PGP Key email A drawing of an astronaut in space The Netherlands

Routing Terraform Requests to Your Private Kubernetes Cluster Via Socks5

in
writing
date
10/9/2024

The SOCKS5 protocol allows TCP traffic forwarding, making it perfect for tunneling connections. Both the Kubernetes and Helm Terraform providers support TCP traffic forwarding, enabling you to route requests to your private cluster.

To configure Terraform to use a local tunnel to the SOCKS5 proxy server, set the proxy_url argument in the provider block.

provider "kubernetes" {
  ...
  proxy_url = "socks5://127.0.0.1:8888"
  ...
}

By specifying the proxy_url, the Kubernetes provider forwards all requests through the SOCKS5 proxy to the Kubernetes API.

/routing-terraform-requests-to-your-private-kubernetes-cluster-via-socks5