gw-09 — Execution

Prerequisites

  • Go ≥ 1.25 (stdlib only, offline). Optional for the real-cluster exercises: kind/k3d, kubectl, nsenter, conntrack.

One-shot

cd gw-09-kubernetes-networking && bash scripts/verify.sh   # tests + sims

Per-language workflow (Go)

cd gw-09-kubernetes-networking/src/go
go test -race -count=1 ./...        # drain race, conntrack, sharding
go run ./cmd/netsim                 # drain ordering + conntrack demo

Package map

FileWhat
k8snet/drain.godrain / EndpointSlice propagation-race model; readiness-first ordering; grace sizing; slice sharding
k8snet/conntrack.goconntrack table model + churn-vs-keepalive exhaustion sim
cmd/netsimruns both simulations and prints the takeaways

Real-cluster exercises

See docs/analysis.md and GUIDE.md §4 for the hands-on cluster labs: trace a packet with nsenter, watch EndpointSlices during a kubectl rollout restart, reproduce the drain race and conntrack exhaustion on kind.