liveBook · Manning

Subnetwork

As explained in Google Anthos in Action

An IP subnet is a contiguous range of IP addresses defined by a network prefix for assigning and routing network addresses.

A subnetwork, or subnet, is an IP address range set aside for a networking purpose. An Anthos GKE cluster needs capacity for three kinds of addresses: nodes and API servers, Pods, and Services. Plan these ranges before deployment so the cluster can grow without exhausting its addresses. section 10.2.1 section 10.2.2

Size each range for what consumes it:

  • Nodes and API servers each need an address on the LAN or VPC. For GKE on GCP, node addresses come from the primary subnet. Estimate the node pool from the number of clusters in a region and the maximum nodes per cluster; a single node subnet can serve multiple clusters. section 10.2.1 section 10.2.2
  • Pods draw from a cluster Pod CIDR. The control plane divides that larger range into equal, node-specific ranges. Size it for both maximum nodes and Pods per node: a Pod moved to another node receives an address from its new node’s range. section 10.2.1 section 10.2.2
  • Each ClusterIP Service needs an address from the service range. Its ClusterIP stays stable as the Pods behind it change and serves as an internal virtual IP; it is not reachable from outside the cluster. section 10.2.1 section 10.2.2

Dividing a Pod range

With a Pod CIDR of 10.0.0.0/16 and /24 allocated per node, the first node receives 10.0.0.0/24, the second 10.0.1.0/24, and subsequent nodes receive further slices. Reserve enough slices for the planned maximum node count. section 10.2.2

Deployment mode changes the overlap decision. In island mode, Pods communicate within a cluster but cannot be reached from outside it, allowing the same IP scheme across clusters. In VPC-native mode, cluster addresses are VPC addresses and must not overlap; plan distinct allocations, even where clusters share a node subnet. Pod reachability from outside a cluster also depends on its networking implementation. section 10.2.2 section 10.2.1

Table 10.4 Determining the host bits required for the Pods

Pods-per-node count

Host bits for Pods

1-8

4

9-16

5

17-32

6

33-64

7

65-110

8

Use the Pods-per-node table to find the host bits needed when sizing the Pod CIDR alongside the maximum node count. section 10.2.2

How Google Anthos in Action covers it

How deep it goes
Works through address pools, per-node Pod subdivision, and sizing inputs rather than IP subnet theory.
Examples
Uses a 10.0.0.0/16 Pod CIDR divided into successive /24 node ranges and tables for node, Pod, and Service capacity.
What it assumes
Assumes familiarity with IP prefixes and Kubernetes nodes, Pods, and Services; does not teach subnet fundamentals from zero.
What you can do after
Operate/configure it by sizing cluster address pools and checking whether planned VPC-native allocations overlap.
How it connects
Connects CIDR, Pod networking, ClusterIP Services, VPC-native networking, and IP address exhaustion.

Also explained in

Compare how 5 books explain subnetwork →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.