eBPF Runtime Security for Kubernetes
Use eBPF runtime security to observe processes, files, privileges, and network activity in Kubernetes while controlling noise and enforcement risk.

Containers are ephemeral, but their processes still interact with the Linux kernel. eBPF runtime security observes that interaction close to the source, linking process execution, file access, privileges and network connections to Kubernetes workloads.
This visibility can detect behavior that image scanning cannot: a signed, vulnerability-free image can still be abused at runtime. The challenge is turning deep telemetry into stable detections without overwhelming analysts or breaking production.
What eBPF Adds
eBPF programs can attach to kernel events and filter data before sending it to user space. Kubernetes-aware tools enrich events with namespace, pod, container, labels and workload identity.
The Tetragon overview describes eBPF-based observability and enforcement for process, system-call, file and network events. Capabilities vary by kernel, tool and deployment mode.
Use cases include:
- unexpected shell or interpreter execution;
- access to sensitive files;
- privilege or capability changes;
- connections from a process that should be offline;
- execution from writable or temporary paths;
- container escape or host interaction indicators.
Start With a Runtime Threat Model
List high-value workloads, expected processes, allowed network destinations, sensitive mounts and privileges. Prioritize identity systems, CI runners, secrets services, ingress, databases and internet-facing applications.
Avoid a global baseline that treats every container alike. A build worker legitimately spawns compilers; a static web server usually should not launch a shell.
Design High-Signal Policies
Combine several dimensions:
- workload or namespace identity;
- binary path and hash;
- parent-child process relationship;
- effective capabilities and user;
- file or socket target;
- destination reputation and prevalence;
- deployment version and image digest.
Examples:
- shell launched inside a production web container;
- package manager executed after deployment;
- service account token read by an unexpected binary;
- outbound connection to a new low-reputation domain;
- process entering host namespaces or touching sensitive kernel paths.
Enrich network destinations with domain reputation and IP reputation. Runtime behavior establishes why the connection matters.
Monitoring Before Enforcement
Run new policies in observation mode. Measure volume, identify legitimate variants and attach an owner to each exception. Test rollouts against representative load and failure conditions.
Move to enforcement only when:
- the behavior is clearly forbidden;
- the policy scope is narrow;
- false-positive evidence is strong;
- rollback and break-glass paths exist;
- the team understands the enforcement action.
Killing a process may not undo an operation already performed. Enforcement semantics must match the protected action.
Pipeline and Storage
Filter at the source to avoid exporting every system call. Normalize workload identity, image digest, node and process tree. Send high-value events to the SIEM and retain raw detail long enough for investigation.
Version policies with code, peer review and tests. Connect policy changes to deployment versions so an application release does not look like attacker drift.
Incident Response
When runtime evidence indicates compromise, preserve pod specification, image digest, node, process tree, open connections, mounted secrets and relevant eBPF events. Isolate the workload according to the orchestration plan; do not rely on deleting the pod before evidence is captured.
Check the image with file hash intelligence, search related network IOCs and review Kubernetes audit logs for control-plane changes.
Metrics
Track covered workloads, high-value policies, events per workload, analyst-confirmed incidents, enforcement actions, prevented operations, false positives and exceptions without owners. Measure the time from a new threat hypothesis to a tested runtime policy.
Conclusion
eBPF gives defenders workload-aware evidence at the Linux kernel boundary. Start with a threat model, filter aggressively and enforce only narrow, well-tested invariants. Combined with container and Kubernetes security, it closes the gap between a trusted image and an untrusted runtime action.
Frequently asked questions
- What is eBPF runtime security?
- It uses verified programs attached to Linux kernel hooks to observe or enforce process, file, privilege, and network activity with workload context.
- Does eBPF replace EDR in Kubernetes?
- Not necessarily. eBPF provides deep Linux and container visibility, while EDR may add host inventory, investigation, user context, and response capabilities. Coverage should be designed together.
- Can eBPF enforcement break workloads?
- Yes. A broad or incorrect policy can terminate legitimate processes or deny operations. Start in monitoring mode, baseline behavior, test failure cases, and use narrow, reversible enforcement.
Related articles
GitHub Actions OIDC: Secure Cloud DeploymentsReplace long-lived cloud secrets with GitHub Actions OIDC while constraining claims, permissions, environments, reusable workflows, and incident response.
Kubernetes Audit Logs: Threat Detection GuideTurn Kubernetes audit logs into detections for privilege abuse, secret access, persistence, risky exec, and control-plane compromise.
Sigstore and Cosign: Verify Container ImagesSign and verify container images with Cosign, keyless identities, transparency evidence, digest pinning, and admission policies that check the signer.
Protect Your Infrastructure
Check any IP or domain against our threat intelligence database with indexed records.
Try the IP / Domain Checker