Skip to main content
Version: 32.0.0

Using Kubectl Proxy

This topic describes how to setup a kubectl proxy for an a9s Kubernetes instance.

Creating the Proxy

After configuring your kubeconfig file to access your a9s Kubernetes instance, you can create a proxy as follow:

kubectl proxy --port=8080 --accept-hosts=".*"

Traffic to the Kubernetes API goes through the a9s Router component, where the request is forwarded to the correct host according to the URL target. Because the a9s Router uses the target host to forward the request using the appropriate backend, it is necessary to use the --accept-hosts parameter. This way, the Host header is accepted by the proxy as the target when access using curl or other tools.

Accessing Via Proxy

On your curl command, you must specify the Host header:

curl --header "Host: <external-route-hostname>" localhost:8080/api


curl --header "Host:" \