If you want to configure multiple domain names for a Knative service, you can specify
the custom domain names and paths in the knative.aliyun.com/serving-ingress
annotation. After you modify the annotation, 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 of Knative. For more information, see Set up a custom domain name for Knative Serving.
knative.aliyun.com/serving-ingress
annotation. For example, if the annotation is modified to knative.aliyun.com/serving-ingress: cafe.mydomain.com/coffee
, it indicates that the custom domain name of the service is cafe.mydomain.com and
the path is /coffee.