Version 2.1

kf map-route


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


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


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.


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


Don't wait for the action to complete on the server before returning
Port on the App the route will connect to
-h, --help
help for map-route
Hostname for the route
URL Path for the route
Weight for the route (default 1)

Inherited flags

These flags are inherited from parent commands.

Config file (default is $HOME/.kf)
Kubectl config file (default is $HOME/.kube/config)
Log HTTP requests to stderr
Space to run the command against. This overrides the currently targeted space