Changing URL Patterns
This lesson explains how we can define a custom URL template and change the URL patterns.
We'll cover the following
Jenkins X’s ability to auto-generate addresses of our applications running in different environments is beneficial. It allows us to stop worrying about whether we’ll introduce a conflict (the same address in multiple environments) and concentrate on the applications themselves.
Auto-generated address pattern
It does that by auto-generating Ingress resources with addresses that follow the pattern which is set by default to the value {{.Service}}.{{.Namespace}}.{{.Domain}}
. So, if we have a service called my-service
deployed to the Namespace pre-prod
and in a cluster accessible through the domain acme.com
, the application would be accessible through the auto-generated address my-service.pre-prod.acme.com
. That is great, but sometimes we might want to change the template, either on the level of the whole cluster or for individual Namespaces. Sometimes we might not even want autogenerated addresses when applications are deployed to specific environments (e.g., production).
Fortunately, Jenkins X allows us to control all that, and we’re about to explore how to establish that control through a single command.
Getting the address of the application in staging
Let’s take a look at the address of our application running in the staging environment.
Get hands-on with 1400+ tech skills courses.