You will use the following instructions in the Pipelines and Deploy Distributed System labs to create a unique routes for your applications. This will help avoid route naming collisions with others on the same foundation.
Tanzu Application Service Routes are domain name resolvable addresses used in the Tanzu Application Service architecture to route network traffic to mapped applications.
A route consists of two parts:
domain: A domain with DNS configuration to resolve to a load balancer forwarding requests to Tanzu Application Service routers.
hostname: A subdomain of the domain associated with the load balancer forwarding requests to Tanzu Application Service routers.
The route specification is as follows:
For example, if the route is
the hostname is
pal-tracker and the domain is
When you push an application to Tanzu Application Service,
if you do not explicitly tell the
cf push command to exclude the route
or map an automatically generated route via the
it will attempt to map a route with the application name as the
hostname component of the route.
This may result in collisions with other applications of the same name running on the same foundation.
Remember that the route is a fully qualified domain name resolvable address that must be unique.
You will need to map a route with a unique hostname component.
The following specify how to construct a unique route.
cf domains command to find the value for the domain argument.
An example output will look like this, but your domain will be specific to your foundation and/or organization:
Getting domains in org bill as bill... name status type details apps.tas.example.com shared mesh.apps.tas.example.com shared apps.internal shared internal
In this example,
apps.tas.example.com is the desired domain.
Do not use the
Try appending a unique string to the end of your application name.
You can use your initials,
the hex code of your favorite color,
or even a generated UUID
uuid from the command line).
Here are some examples:
Once you have decided on a route based from an existing domain,
cf check-route to verify that it is unique for your foundation’s
Here is an example of checking that the route
pal-tracker-besmith is unique in the
cf check-route pal-tracker-besmith apps.tas.example.com
The output will verify whether the route is already claimed on the foundation.
If the route is available for use:
Checking for route... OK Route pal-tracker-besmith.apps.tas.example.com does not exist
If the route is not available for use:
Checking for route... OK Route pal-tracker-besmith.apps.tas.example.com does exist
If the route is available for use,
you can also reserve a route in a space by running the
cf create-route command.
The route will exist,
but not be mapped to any application.
cf create-route <space> <domain> --hostname <hostname>
cf create-route sandbox apps.tas.example.com --hostname pal-tracker-besmith
Creating route pal-tracker-besmith.apps.tas.example.com for org <redacted> / space sandbox as <redacted>... Route pal-tracker-besmith.apps.tas.example.com has been created. OK
If you attempt to reserve a route already reserved or mapped to an existing application on the Tanzu Application Service foundation, you will get this message:
Creating route pal-tracker-besmith.apps.tas.example.com for org <redacted> / space sandbox as <redacted>... Route pal-tracker-besmith.apps.tas.example.com already exists. OK