Help Center/ Cloud Container Engine/ FAQs/ Networking/ Network Planning/ What Is the Relationship Between Clusters, VPCs, and Subnets?
Updated on 2026-06-26 GMT+08:00

What Is the Relationship Between Clusters, VPCs, and Subnets?

A VPC is similar to a private local area network (LAN) managed by a home gateway whose IP address is 192.168.0.0/16. A VPC is a private network built on the cloud and provides basic network environment for running ECSs, load balancers, and middleware. Choose a CIDR block based on your service requirements. You can typically use 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 as the base network, with subnet prefix lengths ranging from the base mask down to /24.

A subnet is a logical subdivision of a VPC. You can partition a VPC into multiple subnets and apply security groups, route tables, and network ACLs to control inter-subnet communication. This isolation allows you to deploy different services in separate subnets.

A cluster is one or a group of ECSs or BMSs (also known as nodes) in the same VPC. It provides computing resource pools for running containers.

As shown in Figure 1, a region may consist of multiple VPCs. A VPC consists of one or more subnets. The subnets communicate with each other through a subnet gateway. A cluster is created in a subnet. There are three scenarios:
  • Different clusters are created in different VPCs.
  • Different clusters are created in the same subnet.
  • Different clusters are created in different subnets.
Figure 1 Relationship between clusters, VPCs, and subnets