KiteGitHub
Quickstart

Networking

The node agent connects pods across nodes, writes the nftables rules for Services, enforces NetworkPolicy and EgressPolicy, and answers pods' DNS lookups.

Overlay between nodesUDP 51820
Pod range for each node/24
Most nodes, default ranges8,192

Pod ranges and peer reachability

Fig. 1 uses the default ranges
A pod on node A, 10.64.0.5, calls a Service. Node A's Service rules, for the Service range 10.96.0.0/16, pick a pod on node B, 10.64.1.7. kitewg0 on node A sends the packet over WireGuard, UDP 51820, to kitewg0 on node B, which passes it through the cni0 bridge to the pod. Node Apods 10.64.0.0/24Node Bpods 10.64.1.0/24Pod10.64.0.5Service rules10.96.0.0/16kitewg0WireGuardkitewg0WireGuardcni0bridgePod10.64.1.7WireGuardUDP 51820node A's Service rules handle the request firstpods on both nodes attach to cni0open between every pair of nodes
Fig. 1 A pod on node A calls a Service whose pod runs on node B. Node A's nftables rules for the Service pick the pod, and WireGuard carries the packet between the nodes.

The 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

PortOpenFor
UDP 51820, or kite-agent join --network-portBetween every pair of nodesThe WireGuard overlay that carries pods’ traffic between nodes
UDP 51820From anywhere, to each node with a public addressNodes in different networks or clouds
TCP 443Outbound, from each node to the cluster’s addressThe node’s connection to the control plane
A NodePort or a host portInbound, to the hostTraffic 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
ParameterDefaultNotes
Pod range10.64.0.0/11

KITE_POD_CIDR. IPv6 example fd12:3456:789a::/48.

Prefix for each node/24

/64 for IPv6. An IPv4 /16 has room for 256 nodes.

Most nodes8,192With the default range. 65,536 with the IPv6 example.
Service range10.96.0.0/16

KITE_SERVICE_CIDR. IPv6 example fd12:3456:789b::/112.

IP familyIPv4 or IPv6Both ranges in one family. Dual-stack is not supported.
OverlayUDP 51820

WireGuard on kitewg0, between every pair of nodes. In the kernel, or in userspace on a kernel without WireGuard.

Pod interfacecni0

The CNI plugins bridge and host-local, which the agent configures in /etc/cni/net.d/10-kite.conflist. Do not install another network add-on, such as Calico or Cilium, because the agent manages this file and the bridge.

Peer probeevery 10 s

One sweep probes every peer once, and takes 10 seconds, or 0.25 seconds for each peer when that is longer.

Cluster DNScluster.localThe agent answers. It forwards other names to the host’s resolver.

Node addresses

AddressWhere it comes fromConnects
PrivateThe source address of the node’s default routeNodes in one VPC. You set nothing.
Public

A node pool machine reads it from the cloud. On a host that you join yourself, pass --network-public-endpoint to kite-agent join

Nodes in different networks or clouds, once the cluster sets KITE_NETWORK_PUBLIC_ENDPOINTS=Allowed. The Node lists it as an ExternalIP in status.addresses.

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 }]
trafficDistributionA pod’s connections go to
Not setEvery ready pod
PreferClose or PreferSameZoneThe ready pods in the node’s zone, then those in its region, then those with its provider, then every ready pod
PreferSameNodeThe 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:

DroppedWhen it
A framehas another source MAC address
A packethas another source IP address
An ARP message or IPv6 neighbor advertisementclaims 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
FieldWhat it shows
peersCounts of peers reached, unreachable, not yet probed, and with no path
unreachablePeersUp to 32 peers this node cannot reach
unreachableFromUp to 32 peers that cannot reach this node
conditions

OverlayReachable, also shown on the Node

wireguard

kernel, or userspace on a kernel without 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

WhenWhat happens
Before a probe confirms itRequests 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

OverlayReachable becomes False on the node’s NodeNetworkStatus and on the Node. Ready and scheduling do not change.

Throughout

kubectl get endpointslices lists every ready pod, and DNS for a headless Service returns every pod.

Next