Based on the number of workloads you're running in your organization, you might need to create additional node subnets to support your workloads' networking requirements. For example, if you have a large number of VM workloads, and those workloads require additional IP addresses in a subnet, then you must create additional node subnets.
Create more subnets in default VPC
During the creation of an organization, a default node subnet in the default
Virtual Private Cloud (VPC) is created automatically in the platform
namespace
of the organization. The default node subnet is used to allocate IP addresses
for cluster nodes inside the organization, as well as virtual machine (VM)
workloads.
Create more node subnets in the default VPC to allocate additional IP addresses for your workloads.
Create a YAML file, such as
subnet.yaml
, for your new node subnet:apiVersion: ipam.gdc.goog/v1 kind: Subnet metadata: labels: ipam.gdc.goog/vpc: default-vpc # Must set this value to default-vpc to indicate the subnet is in the default VPC. name: SUBNET_NAME namespace: platform # Namespace for all node subnets in the default VPC is platform. spec: ipv4Request: prefixLength: CIDR_PREFIX_LENGTH networkSpec: enableGateway: true # Reserves a gateway IP address for the subnet. parentReference: name: PARENT_SUBNET_NAME namespace: platform type: Branch
Replace the following:
SUBNET_NAME
: the name of your new node subnet.CIDR_PREFIX_LENGTH
: the CIDR prefix length of your new node subnet.PARENT_SUBNET_NAME
: the name of the parent subnet, such asdefault-vpc-zone0-cidr
. The parent subnet is typically a zonal root subnet in the default VPC.
See the API reference documentation for the
Subnet
resource for more information.Apply the new node subnet to your organization:
kubectl apply -f subnet.yaml --kubeconfig MANAGEMENT_API_SERVER_KUBECONFIG
Replace
MANAGEMENT_API_SERVER_KUBECONFIG
with the path to the kubeconfig file of your Management API server.
Upscale subnets
The Subnet
resource doesn't support upscaling automatically. To add more CIDR
range to a VPC or network segment, your Infrastructure Operator
(IO) must create new subnets with certain labels. Make a request to your IO
to add the appropriate labels to new subnets to enable upscaling.