Create a service gateway

About this task

The system manages each gateway as a gateway instance.

Prerequisites

Before you create a service gateway, create a storage volume. For more information about creating storage volumes, see container cluster storage management in Resource management.

Procedure

  1. On the top navigation bar, click Cloud Services, and then select Service Gateways from the App Service menu.

  1. Click Create Gateway.

  1. Configure service gateway parameters as needed.

Table-1 Configuring service gateway parameters

Parameter

Description

Instance Name

Specify a name for the service gateway instance. 1 to 64 characters. The value can contain Chinese characters, letters, digits, dots (.), hyphens (-), and underlines (_). It can start with a letter or Chinese character.

Description

Specify a description for the service gateway instance, a string of 0 to 128 characters.

Instance Type

Specify an instance type.

  • Private Instance—Only available to users in the organization to which the creator of the instance belongs.

  • Shared Instance—Available to all users in the system. Users in any organization can view a shared instance and publish APIs to it.

API Release Approval

Select whether API release requires approval. If you enable this option, an API can be published successfully only when the administrator approves it.

Container Flavors

Configure container flavor settings. The values in the Requests field must be smaller than the values in the Limits field.

  • Requests—Specify the minimum CPU cores and memory size that must be available on the node to run the container upon its startup.

  • Limits—Specify the maximum CPU cores and memory size that a running container can use.

This configuration is applicable only to the Kong, Konjac, and API-Studio components as described in the "Service gateway components" The Kong and Konjac components process API requests and their resource usage depends on the service load. Increase the resources assigned to the gateway if it is expected to handle API requests for busy services. For the API-MGT and PG components, the default settings can meet the requirements.

Version

Specify the service gateway version. The value is fixed at 1.0.

Resource Type

Specify the resource type of the service gateway. The value is fixed at Container (containerized gateway).

Resource Configuration

Select a cluster and container AZ to run the gateway container. After you select an AZ for the gateway container, the system places the pod on an automatically selected worker node in the AZ.

Gateway Address

Enter an IP address, an HTTP port number, and an HTTPS port number for the gateway to provide services.

External application systems calls an API by using the gateway IP address, the HTTP or HTTPS port number, and the request path defined in "Publish an API."

By default, the HTTP port number is 48000, and the HTTPS port number is 48443.

Adding a gateway address adds a Kong instance. Multiple Kong instances can expose multiple IPs and ports for gateway instance high availability. You can configure a maximum of 9 instances.

  • One service gateway instance has only on API-MGT component. The Kong settings configured by the API-MGT component take effect on all Kong instances under the service gateway instance. The Kong instances share all other components such as PG and Konjac of the gateway instance.

  • After you configure a gateway address, the API requests can access the IP addresses of Kong instances. As a best practice, deploy a load balancer to connect the IP addresses of Kong instances to the same load balancer to provide a unified service portal.

Storage Configuration

Select a provisioning mode from the Provisioning Mode list. Make sure a shared storage has been configured for the system.

  • Static Provisioning—Select a storage volume, and make sure the system has read-write-once PVs.

  • Dynamic Provisioning—Select a storage class, and specify the data disk size.

  • API request throttling not configured—Make sure the initial data disk size is not lower than 5 GB. As a best practice, increase the size as needed.

  • API request throttling configured—Make sure the initial data disk size is not lower than 15 GB and increase the size by 10 GB for every additional APIs. During daily inspection, check the storage usage and manually clear storage in time when the storage space is used up.

 

  1. Click OK.