Professional Cloud Network Engineer · Domain 1: Designing and planning a Google Cloud VPC network · 21% of the exam
Task 1.4: Designing for Google Kubernetes Engine (GKE).
Public or private nodes and control plane endpoints, primary and secondary subnet ranges, GKE address planning with RFC 1918, non-RFC 1918 and PUPI ranges, IPv6, load balancing for GKE and node pool networking.
Study it
GKE network design: private nodes and control plane endpoints, Pod and Service ranges, IPv6 and load balancing
Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.
Question 1 · choose 1
A GKE cluster in us-central1 uses IP-based control plane access with the external endpoint disabled, and was configured with these flags: --enable-master-authorized-networks --master-authorized-networks=10.20.0.0/16,10.30.0.0/16 --enable-authorized-networks-on-private-endpoint. Administrators in data center A (10.20.0.0/16), connected through HA VPN in us-central1, reach the internal endpoint. Administrators in data center B (10.30.0.0/16), connected through HA VPN in europe-west1, time out, although the VPC network uses global dynamic routing. Which flag should be added?
A--no-enable-google-cloud-access
B--master-authorized-networks with data center B's public VPN gateway address appended
Lifting the allowlist on the internal endpoint doesn't change the region restriction that blocks data center B's traffic.
D--enable-master-global-access
Correct
This flag allows access to the control plane from IP addresses in other Google Cloud regions, which is where data center B's tunnels terminate.
With an authorized network you also choose where internal addresses may reach the control plane's internal endpoint from: only the cluster's own region, or any Google Cloud region in a VPC or on-premises environment. Data center B already has a route and an allowlist entry; its traffic enters through europe-west1, so the cluster needs global access to its control plane.
A service provider's GKE cluster uses the privately used public range 45.45.0.0/16 for Pods, because its RFC 1918 space is exhausted. Its VPC network is peered with a customer's VPC network, both with default peering settings. Pods must open connections to a database VM in the customer's network, and the customer's database audit log must record each Pod's own IP address. The connections time out today. What should be changed?
AOn the provider's side of the peering, turn on export of subnet routes with public IP addresses
BConfigure IP masquerading on the provider's nodes so that Pod traffic leaves with the node IP addresses
COn the customer's side of the peering, turn on import of subnet routes with public IP addresses
DOn the customer's side of the peering, turn on import of custom routes from the provider
Show the answer and why
AOn the provider's side of the peering, turn on export of subnet routes with public IP addresses
Incorrect
Export of subnet routes with public IP addresses is already on by default; the missing piece is on the customer's side.
BConfigure IP masquerading on the provider's nodes so that Pod traffic leaves with the node IP addresses
Incorrect
Masquerading hides Pod addresses behind node addresses, so the audit log would no longer show each Pod's address.
COn the customer's side of the peering, turn on import of subnet routes with public IP addresses
Correct
Import of PUPI subnet routes is off by default, so the customer's network has no route back to 45.45.0.0/16 until it is turned on.
DOn the customer's side of the peering, turn on import of custom routes from the provider
Incorrect
The Pod range is a subnet route, and the custom route settings don't control the exchange of subnet routes with public addresses.
Across VPC Network Peering, subnet routes that use privately used public addresses are exported by default but imported only when the importing side turns that on. For producer Pods on a PUPI range to reach a consumer, the producer exports its PUPI routes and the consumer must enable their import. Masquerading is the documented alternative only when the two sides' PUPI ranges overlap.
A GKE Standard cluster was created with public nodes as its cluster-level setting and has one node pool, pool-a. The team adds pool-b and enables private nodes on pool-b only. Which setting applies to each node pool?
ABoth pools follow the cluster-level setting until the cluster-level setting itself is changed to private nodes
Bpool-b uses private nodes, overriding the cluster setting; pool-a keeps the cluster-level public setting
CBoth pools switch to private nodes, because one private pool changes the cluster's setting
DThe update is rejected, because node isolation can be chosen only when the cluster is created
Show the answer and why
ABoth pools follow the cluster-level setting until the cluster-level setting itself is changed to private nodes
Incorrect
A node pool level setting overrides the cluster-level configuration.
Bpool-b uses private nodes, overriding the cluster setting; pool-a keeps the cluster-level public setting
Correct
Private nodes can be enabled per node pool in Standard clusters, and that setting overrides the cluster-level node configuration.
CBoth pools switch to private nodes, because one private pool changes the cluster's setting
Incorrect
Enabling private nodes on one pool doesn't change other pools or the cluster-level setting.
DThe update is rejected, because node isolation can be chosen only when the cluster is created
Incorrect
These settings can be changed at any time, at the cluster or node pool level.
Private nodes can be enabled at the cluster level or, in Standard clusters, at the node pool level, and the node pool setting overrides the cluster-level configuration. The settings can be changed at any time; workloads that need access outside the cluster's network can fail after a pool becomes private if their path depends on it.
A team creates a VPC-native GKE cluster on a recent version and supplies a secondary range for Pods but none for Services. Where do the cluster's Service IP addresses come from?
AFrom the Google-managed range 34.118.224.0/20
BFrom the Pod secondary range, shared with the Pods
CFrom the node subnet's primary IPv4 range
DNowhere: the cluster can't be created without a Service range
Show the answer and why
AFrom the Google-managed range 34.118.224.0/20
Correct
When no Service range is supplied, recent GKE versions use the Google-managed 34.118.224.0/20 range for Services.
BFrom the Pod secondary range, shared with the Pods
Incorrect
Services don't take addresses from the Pod range.
CFrom the node subnet's primary IPv4 range
Incorrect
The primary range holds node addresses, not Service addresses.
DNowhere: the cluster can't be created without a Service range
Incorrect
A Service range is optional; GKE uses a Google-managed range when it is left out.
VPC-native clusters use alias IP ranges: nodes from the subnet's primary range, Pods from a secondary range. For Services, recent versions use the Google-managed 34.118.224.0/20 range when you don't specify your own.
A team adds a GKE Standard node pool with a maximum of 32 Pods per node. What size of Pod CIDR block does Kubernetes assign to each node in that pool?
A/27, with 32 addresses
B/26, with 64 addresses
C/24, with 256 addresses
D/25, with 128 addresses
Show the answer and why
A/27, with 32 addresses
Incorrect
A /27 covers 9 to 16 Pods per node; each block holds at least twice the maximum number of Pods.
B/26, with 64 addresses
Correct
17 to 32 Pods per node map to a /26 block of 64 addresses.
C/24, with 256 addresses
Incorrect
A /24 is the block for the default of 110 Pods per node (65 to 128).
D/25, with 128 addresses
Incorrect
A /25 covers 33 to 64 Pods per node.
The size of each node's Pod CIDR block depends on the maximum Pods per node, and the block always holds at least twice as many addresses as that maximum. 32 Pods per node gives a /26; the default of 110 gives a /24.