This topic describes how to use the Container Service console to create a serverless Kubernetes cluster.
- Log on to the Container Service console.
- In the left-side navigation pane under Container Service-Kubernetes, choose .
- In the upper-right corner, click Create Kubernetes Cluster.
- On the Select Cluster Template page, find the Standard Serverless Cluster template, and click Create in the template.
- Enter the cluster name.
Note The cluster name must be 1 to 63 characters in length and can contain letters, numbers, Chinese characters, letters, and hyphens (-).
- Select the resource group for the cluster.
- Select the region and zone where you want to locate the cluster.
- Set a VPC for the serverless cluster.
Note Kubernetes clusters support only the VPC network type.
To set a VPC for the serverless cluster, you can click one of the following two options:
- Auto Create: Set the system to automatically create a VPC. Furthermore, in the VPC, the system also creates an NAT gateway and sets an SNAT rule.
- Use Existing: Select an existing VPC from the VPC drop-down list, and then select a VSwitch from
the VSwitch drop-down list.
If you want to enable the cluster to access Internet resources, you must set an NAT gateway for the cluster. For more information, see Create a NAT Gateway.
- Set a NAT gateway and a SNAT rule for the VPC.
- If you set the system to automatically create a VPC, you must select the Nat Gateway check box. This action sets the system to automatically set a NAT gateway and an SNAT rule for the VPC.
- If you select an existing VPC, you must manually set an NAT gateway or set an SNAT rule. Otherwise, the serverless cluster in the VPC cannot access the Internet, which results in a cluster creation failure.
- Set the PrivateZone-based service discovery feature for the cluster. This feature allows you to use a domain name to access the corresponding service in the VPC.
- Attach a tag to the cluster.
Enter a key and its value, and click Add.
- Select the Terms of Service for Serverless Kubernetes check box.
- In the upper-right corner, click Create