Rancher's Runtime Enforcer: Keeping Your Kubernetes Containers in Check with eBPF
Process allowlisting for Kubernetes through LSM and eBPF, from learning to enforcement
I spent way too long staring at container logs trying to figure out what processes were actually running inside my pods. Turned out, so did a lot of other people. So we built something about it.
runtime-enforcer is an open source tool that hooks into the Linux kernel's LSM layer through eBPF to control what's allowed to execute inside Kubernetes containers. It attaches to `security_bprm_creds_for_exec`, which means it intercepts every binary before it starts: interpreters, shebangs, everything. The kernel does the enforcement, not some userspace process racing against the workload.
The workflow is designed around the idea that nobody knows what their containers actually run on day one. So you start in learning mode: runtime-enforcer observes your workloads, records every executable it sees, and generates a policy proposal as a Kubernetes custom resource. You look at it, maybe clean it up, and promote it. Then you move to monitor mode, where violations get logged but nothing gets blocked — you want to make sure you're not about to break production. Once you trust the policy, you flip to protect mode and anything not on the list gets a `-EPERM`. Gradual, boring, the way security should be.
It's Go and C, built on `cilium/ebpf`, packaged as a Helm chart. It handles Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, and scopes rules per-container so your init containers and debug sidecars don't cause false positives.
In this talk we'll go through the architecture, show a live demo of the full learn-to-protect cycle, and share some of the less obvious things we ran into while building eBPF security tooling on real clusters. If you've ever wanted to know what actually runs in your containers and do something about it, this one's for you.
Come for eBPF, stay for the peace of mind.
Licensed to the public under https://creativecommons.org/licenses/by-sa/4.0/