Google Kubernetes Engine (GKE) Cluster Design for VPC-Native Clusters

Designing a VPC-Native Cluster for Google Kubernetes Engine (GKE) | PCNE Exam Answer

Question

You are designing a Google Kubernetes Engine (GKE) cluster for your organization.

The current cluster size is expected to host 10 nodes, with 20 Pods per node and 150 services.

Because of the migration of new services over the next 2 years, there is a planned growth for 100 nodes, 200 Pods per node, and 1500 services.

You want to use VPC-native clusters with alias IP ranges, while minimizing address consumption.

How should you design this topology?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters

When designing a Google Kubernetes Engine (GKE) cluster for an organization, it is important to consider the cluster size and expected growth, as well as IP addressing requirements. In this scenario, the cluster size is expected to grow from 10 nodes, 20 Pods per node, and 150 services to 100 nodes, 200 Pods per node, and 1500 services over the next two years. The goal is to use VPC-native clusters with alias IP ranges while minimizing address consumption.

Option A: Create a subnet of size/25 with 2 secondary ranges of: /17 for Pods and /21 for Services. Create a VPC-native cluster and specify those ranges.

This option creates a subnet with a size of /25, which means it can accommodate up to 128 IP addresses. Two secondary ranges are created: /17 for Pods and /21 for Services. A /17 range can accommodate up to 32,768 IP addresses, and a /21 range can accommodate up to 2,048 IP addresses. This should be sufficient for the expected growth of the cluster. By using alias IP ranges, address consumption is minimized.

Option B: Create a subnet of size/28 with 2 secondary ranges of: /24 for Pods and /24 for Services. Create a VPC-native cluster and specify those ranges. When the services are ready to be deployed, resize the subnets.

This option creates a subnet with a size of /28, which can accommodate up to 16 IP addresses. Two secondary ranges are created: /24 for Pods and /24 for Services. A /24 range can accommodate up to 256 IP addresses. This may not be sufficient for the expected growth of the cluster. The suggestion to resize the subnets when the services are ready to be deployed may cause disruption and downtime.

Option C: Use gcloud container clusters create [CLUSTER NAME]--enable-ip-alias to create a VPC-native cluster.

This option creates a VPC-native cluster and enables IP aliasing. This allows the cluster to use alias IP ranges, which can help minimize address consumption. However, it does not specify the IP ranges for Pods and Services.

Option D: Use gcloud container clusters create [CLUSTER NAME] to create a VPC-native cluster.

This option creates a VPC-native cluster without enabling IP aliasing. This may not be the best choice for minimizing address consumption.

Overall, Option A is the best choice for designing this topology. It creates a subnet with a size of /25, which can accommodate up to 128 IP addresses, and two secondary ranges for Pods and Services that can accommodate the expected growth of the cluster. By using alias IP ranges, address consumption is minimized.