Block-Based IPAM Architecture

Block-Based IPAM Architecture An architecture diagram generated by Archify. Datastore · etcd / Kubernetes API · Architecture component Datastore etcd / Kubernetes API Node 1 · calico-node · Architecture component · expanded to 2 blocks Node 1 calico-node expanded to 2 blocks Node 2 · calico-node · Architecture component · expanded to 2 blocks Node 2 calico-node expanded to 2 blocks Node 3 · calico-node · Architecture component Node 3 calico-node 10.244.0.0/26 · 64 IPs · IPPool 10.244.0.0/16 (blockSize 26) 10.244.0.0/26 64 IPs 10.244.0.64/26 · 64 IPs · IPPool 10.244.0.0/16 (blockSize 26) 10.244.0.64/26 64 IPs 10.244.1.0/26 · 64 IPs · IPPool 10.244.0.0/16 (blockSize 26) 10.244.1.0/26 64 IPs 10.244.1.64/26 · 64 IPs · IPPool 10.244.0.0/16 (blockSize 26) 10.244.1.64/26 64 IPs 10.244.2.0/26 · 64 IPs · IPPool 10.244.0.0/16 (blockSize 26) 10.244.2.0/26 64 IPs Pod 10.244.0.5 · workload on Node 1 · Architecture component Pod 10.244.0.5 workload on Node 1 Pod 10.244.1.5 · workload on Node 2 · Architecture component Pod 10.244.1.5 workload on Node 2 Pod 10.244.2.20 · workload on Node 3 · Architecture component Pod 10.244.2.20 workload on Node 3 block assignment affinity expansion pod IP allocation IPPool 10.244.0.0/16 (blockSize 26) Legend Pod Node Datastore IP block

IP Block Affinity behavior

  • • Block allocation: when a pod is scheduled, its IP comes from a block affine to that node
  • • Block expansion: when the existing block is exhausted, a new block is assigned to the node
  • • Block release: when all pods on the node are deleted, the block affinity is released

Choosing blockSize

  • • /26 = 64 IPs (default)
  • • /28 = 16 IPs (many nodes)
  • • /24 = 256 IPs (high pod density)