kf create-route
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 kf create-route --space myspace myapp.example.com # myapp.example.com # 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
Do not 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.
--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.