Name
kf proxy-route
- Start a local reverse proxy to a Route
Synopsis
kf proxy-route ROUTE [flags]
Description
Proxy route creates a reverse HTTP proxy to the cluster's gateway on a local port opened on the operating system's loopback device.
The proxy rewrites all HTTP requests, changing the HTTP Host header to match the Route. If multiple Apps are mapped to the same route, the traffic sent over the proxy will follow their routing rules with regards to weight. If no Apps are mapped to the route, traffic sent through the proxy will return a HTTP 404 status code.
Proxy route DOES NOT establish a direct connection to any Kubernetes resource.
For proxy to work:
- The cluster's gateway MUST be accessible from your local machine.
- The Route MUST have a public URL
Examples
kf proxy-route myhost.example.com
Flags
--gateway=string
- HTTP gateway to route requests to (default: autodetected from cluster)
-h, --help
- help for proxy-route
--port=int
- Local port to listen on (default 8080)
Inherited flags
These flags are inherited from parent commands.
--config=string
- Config file (default is $HOME/.kf)
--kubeconfig=string
- Kubectl config file (default is $HOME/.kube/config)
--log-http
- Log HTTP requests to stderr
--space=string
- Space to run the command against. This overrides the currently targeted space