Name
kf create-route
- Create a traffic routing rule for a host+path pair
Synopsis
kf create-route DOMAIN [--hostname HOSTNAME] [--path PATH] [flags]
Description
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.
Examples
kf create-route example.com --hostname myapp # myapp.example.com kf create-route --space myspace example.com --hostname myapp # myapp.example.com kf create-route example.com --hostname myapp --path /mypath # myapp.example.com/mypath # Using SPACE to match 'cf' kf create-route myspace example.com --hostname myapp # myapp.example.com kf create-route myspace example.com --hostname myapp --path /mypath # myapp.example.com/mypath
Flags
-
--async - Don't wait for the action to complete on the server before returning
-
-h, --help - help for create-route
-
--hostname= string - Hostname for the route
-
--path= string - URL Path for the route
Inherited flags
These flags are inherited from parent commands.
-
--config= string - Config file (default is $HOME/.kf)
-
--kubeconfig= string - Kubectl config file (default is $HOME/.kube/config)
-
--log-http - Log HTTP requests to stderr
-
--space= string - Space to run the command against. This overrides the currently targeted space

