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
| File | What |
|---|---|
k8snet/drain.go | drain / EndpointSlice propagation-race model; readiness-first ordering; grace sizing; slice sharding |
k8snet/conntrack.go | conntrack table model + churn-vs-keepalive exhaustion sim |
cmd/netsim | runs 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.