×
Community Blog Use ASM to Manage Knative Services (3): Use Custom Domain in Knative on ASM

Use ASM to Manage Knative Services (3): Use Custom Domain in Knative on ASM

Part 3 of this 6-part series describes how to set a custom domain name for Knative Serving.

By Xining Wang

Article Series

Use ASM to Manage Knative Services (1): An Overview of Knative on ASM

Use ASM to Manage Knative Services (2): Use Knative on ASM to Deploy Serverless Applications

Use ASM to Manage Knative Services (3): Use Custom Domain in Knative on ASM

Use ASM to Manage Knative Services (4): Use ASM Gateway to Access Knative Services over HTTPS

Use ASM to Manage Knative Services (5): Canary Deployment of Services Based on Traffic in Knative on ASM

Use ASM to Manage Knative Services (6): Auto Scaling Based on the Number of Traffic Requests

The default DNS name of the service is in the format of {name}.{namespace}.{domain} for a Knative service. Knative uses example.com as the domain name of the service by default. Knative on ASM allows you to use a custom domain name as the default domain name. This article describes how to set a custom domain name for Knative Serving.

Prerequisites

  • A Knative Service is created using Knative on ASM. Please see Part 2 for specific operations.

Modify a Domain Name in the ASM Console

The following example describes how to change a domain name to a custom domain name in the ASM console.

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.
  2. On the Mesh Management page, click the name of the instance you want to manage. Then, on the left-side navigation pane, choose Ecological Integrations > Knative on ASM. On the page that appears on the right, select and set Service Access Domain Suffix. For example, change the domain name to aliyun.com.

1

Access the Knative Service Using the New Domain Name

If you have deployed an application, Knative will automatically update all Knative Services and Routes based on the domain name configuration.

1) Update the Hosts file and add the binding information of the new domain name to the Hosts file. The binding sample is listed below (replace xx.xx.xxx.xx with your gateway IP):

xx.xx.xxx.xx helloworld-go.default.aliyun.com

2) You can use the updated domain name to access the helloworld-go services deployed in the prerequisites.

$ curl http://helloworld-go.default.aliyun.com
Hello Knative!
0 0 0
Share on

Xi Ning Wang(王夕宁)

56 posts | 8 followers

You may also like

Comments

Xi Ning Wang(王夕宁)

56 posts | 8 followers

Related Products