gke extending subnet for a
We can extended subnet if we running out of ip address in a GKE cluster. To do that first we need to create an extended subnet by using the following command
gcloud compute networks subnets create research-extended \
--network=research-aue1-vpc \
--region=australia-southeast1 \
--range=10.20.0.0/20 \
--secondary-range=pods=10.100.0.0/16
Next, we will describe the GKE cluster and list down the subnet that it is currently using
gcloud container clusters describe autopilot-cluster-1 \
--location=australia-southeast1 \
--format="yaml(networkConfig, ipAllocationPolicy)"
Afte that we will attached the new subnet to our GKE cluster here by running the following command
gcloud container clusters update autopilot-cluster-1 \
--location=australia-southeast1 \
--additional-ip-ranges=subnetwork=research-extended,pod-ipv4-range=pods
And in the console, you can see that we have additional multi-subnet support.
The max number of subnet is 9 that can be attached to a cluster.


Comments