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
--asyncDo not wait for the action to complete on the server before returning.
-h, --helphelp for create-route
--hostname=stringHostname for the Route.
--path=stringURL path for the Route.
Inherited flags
These flags are inherited from parent commands.
--as=stringUsername to impersonate for the operation.
--as-group=stringsGroup to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=stringPath to the Kf config file to use for CLI requests.
--kubeconfig=stringPath to the kubeconfig file to use for CLI requests.
--log-httpLog HTTP requests to standard error.
--space=stringSpace to run the command against. This flag overrides the currently targeted Space.