As explained in
Configure Knative Service Domain Template : Knative uses domain template which specifies the golang text template string to use when constructing the Knative service’s DNS name. The default value is
{{.Name}}.{{.Namespace}}.{{.Domain}}
.
cnrs:
domain_template: "{{.Name}}.{{.Namespace}}.{{.Domain}}"
Which means if your domain is
abc.com and you created a workload named
tanzu-java-web-app in namespace
dev, then you will get a url
https://tanzu-java-web-app.dev.abc.com for this workload.
$ kubectl -n dev get ksvc
NAME URL LATESTCREATED LATESTREADY READY REASON
tanzu-java-web-app https://tanzu-java-web-app.dev.abc.com tanzu-java-web-app-00008 tanzu-java-web-app-00008 True
However, sometimes users may would like to create a custom URL, which not follows the rule of
cnrs.domain_template. In this case, users can reference
Configuring custom domains to create a DomainMapping object. But if you are setting
cnrs.default_tls_secret in the TAP(Tanzu Application Platform) profile, you may need to add an additional step of creating a
SecretExport/SecretImport resource pair as Knative expects the secret to be in the same namespaces as the DomainMapping when custom TLS is in use. See the Instructions section.
profile: full
cnrs:
domain_template: "{{.Name}}-{{.Namespace}}.{{.Domain}}"
default_tls_secret: tanzu-system-ingress/cnrs-default-tls