Version 2.2

kf proxy-route

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
IP address of the HTTP gateway to route requests to.
-h, --help
help for proxy-route
--port=int
Local port to listen on. (default 8080)

Inherited flags

These flags are inherited from parent commands.

--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.