If you want to configure multiple domain names for a Knative Service, you can specify
custom domain names and paths in the knative.aliyun.com/serving-ingress
annotation. This way, you can use the custom domain names and paths to access the
Knative Service. This topic describes how to add a custom domain name and a path for
a Knative Service, and use the custom domain name and path to access the Knative Service.
Background information
Knative has a default primary domain name. Each Knative Service has a unique domain
name that is generated based on the primary domain name of Knative, the namespace,
and the Service name. The format of a domain name is {ksvc-name}.{namespace}.{knative-default-domain}
. The default primary domain name of Knative is example.com
. If a Knative Service named coffee is deployed in the default namespace, the default
domain name of the Knative Service is coffee.default.example.com
. You can modify the default primary domain name example.com
of Knative. For more information, see Set a custom domain name for Knative Serving.
knative.aliyun.com/serving-ingress
annotation. For example, knative.aliyun.com/serving-ingress: cafe.mydomain.com/coffee
specifies the cafe.mydomain.com
domain name and the /coffee path.