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=stringIP address of the HTTP gateway to route requests to.
-h, --helphelp for proxy-route
--port=intLocal port to listen on. (default 8080)
Inherited flags
These flags are inherited from parent commands.
--as=stringUsername to impersonate for the operation.
--as-group=stringsGroup to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=stringPath to the Kf config file to use for CLI requests.
--kubeconfig=stringPath to the kubeconfig file to use for CLI requests.
--log-httpLog HTTP requests to standard error.
--space=stringSpace to run the command against. This flag overrides the currently targeted Space.