Tag

eBPF Lab 7

Swap a k3d cluster's networking for Cilium and watch every flow in Hubble, get RED metrics and traces from an app with no instrumentation code, and catch (then kill) a shell's download in a container with Falco and Tetragon, all with eBPF on one DGX Spark.

Built Level: Advanced Time: about 2 hours Runs on: k3d (lab-ebpf) on the homelab network, Cilium as the CNI Observability: Hubble, Tetragon, Falco + Falcosidekick UI, OpenTelemetry eBPF Instrumentation → homelab mon cluster Stack: Cilium 1.20, Hubble, Tetragon 1.7, Falco 0.45, OBI 0.13, k3s 1.35, Go, Redis Storage: static local PVs bound to PVCs, no hostPath; data survives make rebuild 7 of 7 parts written

Parts

Experiments

Hubble UI service map for namespace demo: world, web, api and redis connected by flows
1 See every flow without kube-proxy

Send traffic through web, api and redis and see each hop in Hubble, with Cilium's eBPF doing the service load balancing that kube-proxy used to do.

eventsmetrics
Hubble UI for namespace demo with the web to redis edge shown as dropped and dropped flows in the table
2 Drop a connection by identity

Allow only api pods to talk to redis and watch Cilium drop web's direct connection in eBPF, while the app keeps working.

events
Trace waterfall of one visit: demo/web GET /api/visits with demo/api GET /api/visits and its Redis INCR client span nested under it
4 A trace across web, api and redis

Follow requests through nginx, the Go API and Redis as traces that OBI builds from the kernel, and find out when its trace context joins them into one trace and when it doesn't.

traces
Falcosidekick UI dashboard with the Shell in demo pod event from the web pod
5 Catch a shell in a container

Open a shell in the web pod and see Falco's syscall rules flag it within a second, with pod and container metadata, in the Falcosidekick UI.

events
Falcosidekick UI events: Shell in demo pod warnings for the sh -c wget command and no Network tool alert for wget
6 Kill a download before it starts

Apply a Tetragon policy that SIGKILLs any process in a demo pod that calls execve() for wget, curl or nc, run wget, and compare what Tetragon and Falco each record.

eventslogs
Demo app page after a full cluster rebuild, the counter continuing from before
7 Delete the cluster and keep the data

Delete and recreate the whole cluster and see Redis come back with the same counter, because its PVC re-binds to a static local PV over the same host folder.

events