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 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
- Do not wait for the action to complete on the server before returning.
- help for create-route
- Hostname for the Route.
- URL path for the Route.
These flags are inherited from parent commands.
- Username to impersonate for the operation.
- Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
- Path to the Kf config file to use for CLI requests.
- Path to the kubeconfig file to use for CLI requests.
- Log HTTP requests to standard error.
- Space to run the command against. This flag overrides the currently targeted Space.