Version 2.1

kf create-route


kf create-route - Create a traffic routing rule for a host+path pair


kf create-route DOMAIN [--hostname HOSTNAME] [--path PATH] [flags]


Creating a Route allows Apps to declare they want to receive traffic on the same host/domain/path combination.

Routes without any bound Apps (or with only stopped Apps) will return a 404 HTTP status code.

Kf doesn't enforce Route uniqueness between Spaces. It's recommended to provide each Space with its own subdomain instead.


  kf create-route --hostname myapp #
  kf create-route --space myspace --hostname myapp #
  kf create-route --hostname myapp --path /mypath #
  # Using SPACE to match 'cf'
  kf create-route myspace --hostname myapp #
  kf create-route myspace --hostname myapp --path /mypath #


Don't wait for the action to complete on the server before returning
-h, --help
help for create-route
Hostname for the route
URL Path for the route

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