I’m building a Kubernetes homelab in VirtualBox using kubeadm (1 control-plane + 2 workers) and Calico as the CNI. Each VM has two NICs:
-
NIC1: NAT (DHCP) for internet access
-
NIC2: Host-Only (static IPs) for node-to-node traffic
The Host-Only network is 192.168.56.0/24. Calico’s default IPPool CIDR in custom-resources.yaml is 192.168.0.0/16. Since 192.168.0.0/16 includes 192.168.56.0/24, the Pod network overlaps the VM/node network.
Example configuration:
VirtualBox Host-Only network: 192.168.56.0/24
VirtualBox NAT network: 10.0.2.0/24 (DHCP)
Nodes (Host-Only NIC / static IPs):
k8s-cp1: 192.168.56.21
k8s-w1: 192.168.56.22
k8s-w2: 192.168.56.23
Pod CIDR options:
Calico default IPPool: 192.168.0.0/16 (possible overlap)
Alternative Pod CIDR: 10.244.0.0/16 (non-overlapping example)
kubeadm init command options:
Option A (keep Calico default):
sudo kubeadm init
--apiserver-advertise-address=192.168.56.21
--pod-network-cidr=192.168.0.0/16
Option B (non-overlapping):
sudo kubeadm init
--apiserver-advertise-address=192.168.56.21
--pod-network-cidr=10.244.0.0/16
Calico custom-resources.yaml (Installation -> calicoNetwork -> ipPools):
cidr: 192.168.0.0/16 (default) OR
cidr: 10.244.0.0/16 (non-overlapping)
Questions:
Is it safe to keep Calico default 192.168.0.0/16 when my Host-Only network is 192.168.56.0/24 (inside that /16)?
If it’s not safe, is the correct best practice always: “Pod CIDR must not overlap with any node/VM networks”?
Are there edge cases where overlap appears to work but later causes hard-to-debug routing/DNS/service issues?
Thanks for any guidance!