kf map-route

Grant an App access to receive traffic from the Route.

Name

kf map-route - Grant an App access to receive traffic from the Route.

Synopsis

kf map-route APP_NAME DOMAIN [--hostname HOSTNAME] [--path PATH] [--weight WEIGHT] [flags]

Description

Mapping an App to a Route will cause traffic to be forwarded to the App if the App has instances that are running and healthy.

If multiple Apps are mapped to the same Route they will split traffic between them roughly evenly. Incoming network traffic is handled by multiple gateways which update their routing tables with slight delays and route independently. Because of this, traffic routing may not appear even but it will converge over time.

Examples

kf map-route myapp example.com --hostname myapp # myapp.example.com
kf map-route myapp myapp.example.com # myapp.example.com
kf map-route myapp example.com --hostname myapp --weight 2 # myapp.example.com, myapp receives 2x traffic
kf map-route --space myspace myapp example.com --hostname myapp # myapp.example.com
kf map-route myapp example.com --hostname myapp --path /mypath # myapp.example.com/mypath

Flags

--async

Do not wait for the action to complete on the server before returning.

--destination-port=int32

Port on the App the Route will connect to.

-h, --help

help for map-route

--hostname=string

Hostname for the Route.

--no-short-circuit-wait

Allow the CLI to skip waiting if the mutation does not impact a running resource.

--path=string

URL path for the Route.

--weight=int32

Weight for the Route. (default 1)

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.