Networking
The node agent connects pods across nodes, writes the nftables rules for Services, enforces NetworkPolicy and EgressPolicy, and answers pods' DNS lookups.
Pod ranges and peer reachability
Fig. 1 uses the default rangesThe node agent does the work of kube-proxy, CoreDNS and a network add-on such
as flannel. Each node gets one /24 of the pod range, or one /64 for IPv6,
and containerd connects each pod to the node’s cni0 bridge. Choose ranges
that do not overlap your own networks.
Open these ports
| Port | Open | For |
|---|---|---|
UDP 51820, or kite-agent join --network-port | Between every pair of nodes | The WireGuard overlay that carries pods’ traffic between nodes |
UDP 51820 | From anywhere, to each node with a public address | Nodes in different networks or clouds |
TCP 443 | Outbound, from each node to the cluster’s address | The node’s connection to the control plane |
| A NodePort or a host port | Inbound, to the host | Traffic from outside the cluster to a pod |
Open them in your firewalls, security groups and routes. A peer is another node in the cluster. A node that cannot reach a peer still joins, becomes Ready and runs pods, but its pods reach only pods on the nodes it can reach. See Check reachability between nodes.
Defaults
Values that apply to every node unless you set them| Parameter | Default | Notes |
|---|---|---|
| Pod range | 10.64.0.0/11 |
|
| Prefix for each node | /24 |
|
| Most nodes | 8,192 | With the default range. 65,536 with the IPv6 example. |
| Service range | 10.96.0.0/16 |
|
| IP family | IPv4 or IPv6 | Both ranges in one family. Dual-stack is not supported. |
| Overlay | UDP 51820 | WireGuard on |
| Pod interface | cni0 | The CNI plugins |
| Peer probe | every 10 s | One sweep probes every peer once, and takes 10 seconds, or 0.25 seconds for each peer when that is longer. |
| Cluster DNS | cluster.local | The agent answers. It forwards other names to the host’s resolver. |
Node addresses
| Address | Where it comes from | Connects |
|---|---|---|
| Private | The source address of the node’s default route | Nodes in one VPC. You set nothing. |
| Public | A node pool machine reads it from the cloud. On a host that you join yourself, pass
| Nodes in different networks or clouds, once the cluster sets
|
A node tries a peer’s private address first, then its public address, and uses the first that responds. See Join nodes in different networks.
DNS and traffic out of the cluster
Pods resolve cluster.local names through the agent, which forwards other
names to the host’s resolver. If the host cannot resolve public names, its
pods cannot either.
Traffic to an address outside the pod range leaves through the host’s routes. To publish an HTTP service, see Ingress and load balancing.
Traffic distribution
A Service sends each connection to any of its ready pods, wherever they run.
To keep a pod’s connections in its zone, set spec.trafficDistribution:
apiVersion: v1
kind: Service
metadata:
name: api
spec:
selector: { app: api }
trafficDistribution: PreferClose
ports: [{ port: 80, targetPort: 8080 }]
trafficDistribution | A pod’s connections go to |
|---|---|
| Not set | Every ready pod |
PreferClose or PreferSameZone | The ready pods in the node’s zone, then those in its region, then those with its provider, then every ready pod |
PreferSameNode | The ready pods on the node, then the pods that PreferClose picks |
Each endpoint in the Service’s EndpointSlices names its node’s zone in zone,
and the zone or node that should prefer it in hints. A node leaves out the
pods on peers that it cannot reach before it applies the setting, so when every
pod in its zone is on an unreachable peer, the node takes the next step.
Upstream Kubernetes falls back from the zone straight to every ready pod. In a cluster in one region, both pick the same pods.
NetworkPolicy
The agent enforces NetworkPolicy ingress and egress rules. Policy matches
traffic by source address, so the agent binds each pod’s port on cni0 to
the pod’s MAC and IP addresses, and the node drops from that port:
| Dropped | When it |
|---|---|
| A frame | has another source MAC address |
| A packet | has another source IP address |
| An ARP message or IPv6 neighbor advertisement | claims another pod’s address |
A pod’s containers start only after the agent binds the pod’s port, and the check holds while the agent restarts. The node does not check a pod that uses the node’s network.
Egress policy
An EgressPolicy limits the hosts outside the cluster that a selected pod can reach. See Egress policy.
When nodes join or leave
- A node gets no new pods while it is disconnected, or before it reports that its network is set up.
- A removed node’s pod range stays reserved until every remaining node has applied the change.
- A disconnected node keeps its range until it reconnects, or until you delete its Node.
Check reachability between nodes
Each agent probes every other node through WireGuard, and records the result
in a NodeNetworkStatus with the same name as the node:
kubectl get nodenetworkstatuses.kiteplane.dev
kubectl get nodenetworkstatuses.kiteplane.dev <node> -o yaml
| Field | What it shows |
|---|---|
peers | Counts of peers reached, unreachable, not yet probed, and with no path |
unreachablePeers | Up to 32 peers this node cannot reach |
unreachableFrom | Up to 32 peers that cannot reach this node |
conditions |
|
wireguard |
|
A peer in another network, one that this node has never reached and has no
public endpoint for, counts under peers.noPath and does not change the
condition. The probe tests only the WireGuard overlay, not pod ports,
NetworkPolicy, DNS or MTU.
When a peer stops responding
| When | What happens |
|---|---|
| Before a probe confirms it | Requests to the peer’s pods fail. |
| Once a probe confirms it | Within one report interval, the node rewrites its rules and stops sending Service traffic to the peer’s pods. So in a partitioned network, a Service keeps working within each part. The interval is 10 seconds in a cluster of up to 500 nodes, and grows with the cluster to at most 60 seconds. |
| After three failed probes |
|
| Throughout |
|
Next
- Nodes: the host and its control connection.
- Egress policy: limit the hosts a pod can reach outside the cluster.
- Troubleshoot: steps for a pod that cannot reach another.
- Expose a workload: publish an HTTP Service through Cloudflare Tunnel.
- Compatibility and limitations: known differences from upstream Kubernetes.