1. Privileges #
An eBPF agent is a sensitive component.
What to grant #
Loading an eBPF program requires elevated capabilities. Since Linux 5.8, you can avoid privileged: true by granting only the capabilities needed:
securityContext:
capabilities:
add: [BPF, PERFMON, SYS_PTRACE, NET_RAW, CHECKPOINT_RESTORE, DAC_READ_SEARCH, SYS_RESOURCE]
# la liste exacte dépend de l'outil : voir sa documentationCommon mistake: An eBPF agent can read other processes' memory. Treat its image, configuration and updates with the same care as a security component: signed image, pinned version, dedicated namespace.
2. Prerequisites and environments #
Not all kernels are equal.
Checks #
| Point | Recommendation |
|---|---|
| Kernel version | 5.8 minimum, 5.15+ recommended |
| BTF | /sys/kernel/btf/vmlinux present (CO-RE) |
| Managed Kubernetes | EKS, GKE, AKS: recent kernels are fine; GKE Autopilot and Fargate restrict privileged DaemonSets |
| Containers | Docker Desktop on macOS or Windows runs a Linux VM: tools see the VM, not the host |
Overhead #
Overhead depends on event frequency: a few percent of CPU for profiling or network flows, more for tracing every system call of a heavily loaded service. Measure on one node before rolling out.
3. TLS and security observability #
Two special use cases.
Encrypted traffic #
A TLS packet is unreadable to a network probe. Tools like Beyla work around this with uprobes on encryption libraries (OpenSSL, Go crypto/tls) to read the data before encryption or after decryption.
Tetragon and Falco #
| Tool | Usage |
|---|---|
| Tetragon (Cilium) | Observe and block in real time: executions, file access, connections, with TracingPolicy policies |
| Falco (CNCF) | Rule-based intrusion detection: shell in a container, reading /etc/shadow... |
Good practice: These tools produce events to send to Loki or Elasticsearch: they complement operational observability with security observability.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
eBPF explained: programs in the Linux kernel to observe without instrumenting
What eBPF is, how a program is verified and then run in the kernel, hook points (kprobes, uprobes...
Zero-code instrumentation with Grafana Beyla (OpenTelemetry eBPF Instrumentation)
Get RED metrics and HTTP/gRPC traces from any application without changing it: Grafana Beyla and ...
eBPF best practices for observability
Checklist for adopting eBPF in observability: choosing tools, gradual rollout, agent security, co...
Observing the Kubernetes network with Cilium Hubble
Make a Kubernetes cluster's network flows visible with Cilium Hubble: architecture, the hubble ob...
Continuous profiling with eBPF: Parca, Pyroscope and the OpenTelemetry profiler
Continuously profile every process on a host with eBPF: principle, Parca and parca-agent, Pyrosco...
Diagnosing with bpftrace and the bcc tools
Everyday eBPF diagnostic tools: bpftrace one-liners (system calls, files, latencies), bcc tools (...
Deploying and operating Pyroscope on Kubernetes
Install Pyroscope with Helm, collect cluster profiles with Alloy (annotations and eBPF), size, se...
Grafana Pyroscope best practices: collection, labels, analysis and costs
Production checklist for continuous profiling with Pyroscope: choosing the collection mode, label...
Beyla and Alloy: zero-code RED metrics and traces with beyla.ebpf
Enable Beyla eBPF instrumentation in Alloy: service discovery, RED metrics to Mimir, traces to Te...