If you have applications in a Container Service for Kubernetes (ACK) cluster and the applications are accessed over the Internet, you can use an HTTP API and a route in the Cloud-native API Gateway console for the access. This topic uses Alibaba Cloud ACK as an example to describe how to use Cloud-native API Gateway to allow external access to microservices applications.
Prerequisites
An ACK cluster is created. For more information, see Create an ACK managed cluster.
A microservices demo is deployed to ACK.
Process overview
First you create a Cloud-native API Gateway instance. Then, you associate a service from ACK. After that, you create a routing policy for your associated service in Cloud-native API Gateway to make the service available for access based on the routing policy.
Create a Cloud-native API Gateway instance.
In this step, you create a Cloud-native API Gateway instance based on your microservices environment.
In this step, you create an HTTP API in the gateway instance.
In this step, you configure a routing policy for your service and publish the routing policy.
Add a service source.
In this sub-step, you add a service source in Cloud-native API Gateway. In this example, ACK is used as a service source.
Add a service.
In this sub-step, you add a service. Cloud-native API Gateway can obtain namespaces from ACK and then add existing services as candidate services.
In this step, you check whether the created route works as expected and adjust the route if necessary.
Step 1: Create a Cloud-native API Gateway instance
Log on to the Cloud-native API Gateway console. If you are using Cloud-native API Gateway for the first time, you must perform the following operations:
NoteIf you are accessing Cloud-native API Gateway for the first time, the system prompts you to authorize it to create a service-linked role.
On the page that appears, click Authorize Now. In the dialog box that appears, click OK to create the service-linked role.
Click Experience Cloud-native API Gateway Now to go to the console.
In the left-side navigation pane, click Instance. In the top navigation bar, select a region. Then, click Create Instance.
ImportantMake sure that the instance is created in the same region as the ACK cluster.
On the buy page, configure the parameters and click Buy Now.

On the Confirm Order page, read the terms of service and click Activate Now.
NoteInstance creation may require two to three minutes to complete.
Go back to the Instance page to check the information and status of the created instance.
If the instance information is as expected and its status is Running, the instance is successfully created.
Step 2: Create an HTTP API
On the API page of the Cloud-native API Gateway console, click Create API.
In the dialog box that appears, click Create in the HTTP API section. In the Create HTTP API panel, configure the API Name parameter as prompted.
Step 3: Create a route
On the API page of the Cloud-native API Gateway console, click the API that you want to manage.
Click Create Route. In the Create Route panel, configure the parameters.
Configure basic route information

Domain Name: You can click Add Domain Name on the right to create a domain name in the Add Domain Name panel.
Path: Select Prefix from the drop-down list and enter a forward slash (/) in the field to match HTTP requests that start with a
/.
Select an instance and configure the backend service
When you create a gateway instance, the system automatically creates a default environment and associates the environment with the instance.
Select the instance created in Step 1 from the Instance drop-down list.

Scenarios: Select Single Service from the Scenarios drop-down list.
For the Backend Services parameter, click Create Service below Service Name.

Create a service source and a service.
Select ACK from the Source Type drop-down list.
Click Add Source and select the cluster that you created in Prerequisites section.
From the service list, select
httpbinand click OK.
In the Backend Services configuration item, select the service created in the previous step from the Service Name drop-down list.

Click Save and Publish.
Step 4: Debug the route
On the API page of the Cloud-native API Gateway console, click the API that you want to manage.
In the route list, find
httpbin-demoand click Debug in the Actions column.On the page that appears, enter version and click Send. The following figure shows the result that is returned.

References
For more information about how to manage multiple ACK clusters, see Use Cloud-native API Gateway to manage multiple ACK clusters.
For more information about the frequently asked questions (FAQ) about using Cloud-native API Gateway. see FAQ.
