Kubernetes admission controls and image scanning say nothing about what a container actually does once it is running, and Tetragon is one way to see and stop that behaviour inside the Linux kernel. Tetragon is a Cilium sub-project that uses eBPF to observe process execution, system calls, file and network activity, and can enforce policy in the kernel by overriding a function's return value or killing the process. This guide covers how it is deployed, how TracingPolicy resources and selectors work, which detections to start with, how to move from monitoring to enforcement without breaking workloads, and how to get events into a SIEM. It is written for Kubernetes platform and security engineers who already know the basics of eBPF and container runtime security.
This is an independent guide from NHI Mgmt Group, based on Tetragon's public documentation as of November 2026. It is not sponsored or reviewed by the Tetragon project. Product features change, so confirm settings against Tetragon's current documentation.
Key takeaways
- Filtering happens in the kernel. Tetragon evaluates selectors in eBPF and only passes matching events to the user space agent, which keeps overhead down and lets enforcement act before a system call completes.
- Policies are code with kernel side effects. A TracingPolicy hooks kprobes, tracepoints, uprobes or LSM hooks; the documentation warns that it is low level and needs kernel and container knowledge to avoid issues such as TOCTOU bugs.
- Observe before you enforce. Every policy with enforcement actions can run in
monitormode, set in the policy, at load time or at runtime, so the same YAML can be tested and then switched on. - Check the kernel first. Tetragon needs Linux 4.19 or later and BTF; enforcement needs
CONFIG_BPF_KPROBE_OVERRIDE, andtetra probereports what the node actually supports. - The agent is a high value target. It runs privileged on every node, so lock down who can create TracingPolicy objects, keep gRPC on a Unix socket or behind mutual TLS, and protect exported event files.
What Tetragon does
Tetragon detects security significant events such as process execution, system call activity and I/O including network and file access. In Kubernetes it is workload aware: events carry namespace, pod and container identity, and policies can be scoped to them. The project documentation describes three properties that matter in practice:
- In-kernel filtering: filters on file names, sockets, binary names, namespaces and capabilities run in eBPF, so high frequency events such as
readandwritedo not wake the agent unless they match. - Arbitrary hook points: no traced function is hard coded in the engine. Policies choose the kernel function, tracepoint or user space symbol, and the project ships example policies as starting points.
- Kernel state awareness: hooking deep in the kernel, for example at LSM security hooks, avoids the classic syscall tracing problems of data read before it is final or altered by the caller.
Tetragon complements, rather than replaces, admission control and image scanning. See the Admission Control vs Runtime Security and the Container Runtime Security Guide for where runtime controls sit in the wider stack.
Architecture and deployment
On Kubernetes the recommended install is the Helm chart from helm.cilium.io, which deploys the agent as a DaemonSet in kube-system plus an operator. The operator registers the TracingPolicy, TracingPolicyNamespaced and PodInfo custom resources; PodInfo maps pod IP addresses to workloads so network events can be attributed. Tetragon can also run as a standalone container or a systemd service, where policies are loaded from files or through the tetra gRPC CLI.
| Component or setting | Default in the Helm chart | What to decide |
|---|---|---|
| Agent DaemonSet | One pod per node, privileged | Node pools in scope; resource requests and limits |
tetragon.grpc.address | unix:///var/run/tetragon/tetragon.sock | Keep the Unix socket; the chart warns against TCP without TLS client verification |
tetragon.grpc.tls | Disabled, client certificate not required | Turn on with requireClientCert if anything connects over the network |
tetragon.exportFilename / exportDirectory | tetragon.log in /var/log/tetragon, permissions 600 | Who may read the file; rotation via exportFileMaxSizeMB (10) and exportFileMaxBackups (5) |
tetragon.exportDenyList | Health checks and the "", cilium and kube-system namespaces excluded | Whether to see system namespaces; by default kube-system pods are filtered out |
tetragon.prometheus.port | Metrics enabled on 2112 (operator 2113) | Restrict scraping with network policy; metrics reveal configuration |
tetragon.enablePolicyFilter | true | Required for namespace and pod label filtering; leave on |
rthooks.enabled | false | Enable OCI runtime hooks so namespaced policies apply before a container starts |
Kernel version requirements
The FAQ states a minimum of Linux 4.19, with tests on the 4.19, 5.4, 5.10 and 5.15 long term kernels and bpf-next, and recommends the newest stable kernel available because not all features work on older ones. On arm64, kernel 5.10 or later is recommended for full functionality. BTF is required for CO-RE loading: the agent looks for /sys/kernel/btf/vmlinux, then /var/lib/tetragon/btf, or a path passed with --btf. Key kernel options are CONFIG_BPF_SYSCALL, CONFIG_BPF_JIT, CONFIG_DEBUG_INFO_BTF, CONFIG_BPF_KPROBE_OVERRIDE for enforcement, the cgroup options for process tracking, and CONFIG_BPF_LSM if you want LSM hooks. Run tetra probe config and tetra probe on a representative node of each pool before rollout; managed node images differ.
Tetragon itself loads BPF programs and needs the matching privileges. The eBPF Security Guide explains why CAP_BPF and CAP_SYS_ADMIN should be treated as administrator rights, and why your inventory of expected BPF programs should include the Tetragon agent.
TracingPolicy basics
A TracingPolicy (API group cilium.io/v1alpha1) has a hook point and up to five selectors per hook. Each selector is a set of filters joined by AND, plus actions. If a hook has no selectors, the default action is Post (emit an event). Policies live in three domains that do not overwrite each other: k8s (kubectl), grpc (tetra) and static (startup flags such as --tracing-policy-dir).
| Element | Options | Notes from the documentation |
|---|---|---|
| Hook points | kprobes, tracepoints, uprobes, LSM BPF hooks, plus fentry/fexit, raw tracepoints and USDT | LSM hooks need CONFIG_BPF_LSM=y |
| Argument filters | matchArgs with Equal, Prefix, Postfix, FileType, InMap and others; matchReturnArgs | Max 5 matchArgs per selector, 4 values each; use InMap for larger lists |
| Process filters | matchBinaries, matchParentBinaries (with followChildren), matchPIDs, matchCmdArgs | Command line matching sees at most 256 bytes of arguments |
| Context filters | matchNamespaces, matchCapabilities, matchNamespaceChanges, matchCapabilityChanges | Useful for privilege change and container escape signals |
| Workload scope | TracingPolicyNamespaced, podSelector, containerSelector (name, repo), hostSelector, nodeSelector | A policy skipped by nodeSelector shows state skipped in tetra tracingpolicy list |
| Actions | Post, NoPost, Sigkill, Signal, Override, NotifyEnforcer, GetUrl, DnsLookup, TrackSock | Post accepts rateLimit (for example 5m) and rateLimitScope of thread, process or global |
Start from the project's policy library rather than a blank file, and keep each policy small and single purpose so its mode, owner and expected event rate are clear.
Observability use cases
Without any TracingPolicy, Tetragon already emits process_exec and process_exit events with binary, arguments, parent, and pod metadata. Policies add the rest. Good first detections, all from the project's use case documentation:
| Use case | Hook approach | Threat it surfaces |
|---|---|---|
Sensitive file access (/etc/shadow, /etc/passwd, service account token paths) | LSM hooks security_file_permission, security_mmap_file and security_path_truncate (security_file_truncate from Linux 6.2) with Equal or Prefix path filters | Credential access, ATT&CK T1003.008 |
| Unexpected execution in a container | Base exec events, filtered for shells or package managers in images that should not run them | Interactive access, T1059.004 |
| Privileged execution and credential changes | Capability and credential change filters (matchCapabilityChanges, process credential monitoring) | Setuid abuse T1548.001, exploitation T1068 |
| Namespace changes | matchNamespaceChanges on a container process | Escape to host, T1611 |
| Kernel module loads | Host system change policies for module loading | Persistence and rootkit installation on nodes |
| Network connections by binary | Socket tracking kprobes with destination filters | Unexpected egress from a workload |
The documentation explains why it hooks security_file_permission rather than individual system calls: read, write, copy_file_range, sendfile, aio and io_uring all pass through it, so one hook covers paths a syscall list would miss. Service account tokens are machine credentials; reads of the projected token by an unexpected binary are worth an alert. See the Kubernetes Security Guide for the identity side of pod credentials.
Enforcement safely
Tetragon enforces in two ways. Override runs in place of the probed function and returns the value in argError, so the operation never executes; generally only system calls and security check functions allow this. Sigkill terminates the process synchronously, but the documentation notes that a SIGKILL during write() does not guarantee the data is not written, so combine Signal with Override when the operation must not complete.
Policy mode is the safety switch. A policy can be monitoring (enforcement actions elided), enforcement, or monitor_only when it has no enforcement actions. Mode is set, in increasing priority, in spec.options with the policy-mode key, at load time with tetra tracingpolicy add --mode monitor, or at runtime with tetra tp set-mode. The NENFORCE and NMONITOR columns of tetra tracingpolicy list show how often each path fired.
- Write and review: treat the policy as code, with a named owner, intent, and expected matches, reviewed through change control as the threat model advises.
- Deploy in monitor mode to a canary node pool using
nodeSelector, or to one namespace withTracingPolicyNamespaced. - Measure for at least one full release cycle: compare monitor counts with what you expected; every match is a process that would have failed or died.
- Tune selectors with
matchBinariesorNotInexceptions for legitimate tools, then re-run in monitor mode. - Switch to enforce for the canary scope only, with application owners watching error rates.
- Widen scope pool by pool. Enable OCI runtime hooks (
rthooks) so namespaced policies are in place before containers start, otherwise they apply best effort from API server data. - Roll back by setting the policy back to monitor at runtime, or deleting the resource, rather than uninstalling the agent.
The threat model also warns that choosing the wrong hook point is a security and visibility risk in its own right, not a Tetragon flaw: validate that each hook actually covers the operation you mean to block.
Exporting events to SIEM
Events are JSON, written to stdout (picked up by the export-stdout sidecar and the cluster log pipeline), to rotated files, or streamed over gRPC to tetra getevents and other clients. The default export allowlist covers PROCESS_EXEC, PROCESS_EXIT, PROCESS_KPROBE, PROCESS_UPROBE, PROCESS_TRACEPOINT and PROCESS_LSM; the deny list applies to file sinks only and does not filter gRPC output.
- Volume control: use
fieldFiltersto drop unused fields,exportRateLimit(events per minute, -1 is unlimited by default), andPostrateLimitin noisy policies. - Redaction:
redactionFiltersapply RE2 expressions to argument fields so secrets passed on command lines do not land in the SIEM. - Protection of the data: the threat model notes that events reveal system behaviour and user activity; apply access control, encryption in transit and at rest, and a retention period.
- Correlation fields: keep
process.pod.namespace, pod name, container image, binary, parent and node so analysts can pivot to Kubernetes audit logs.
See the SIEM Guide for parsing, retention and detection engineering on top of these events.
Operational pitfalls
- Silent event loss: under load the ring buffer can drop events. Watch
tetragon_bpf_missed_events_total,tetragon_observer_ringbuf_events_lost_total,tetragon_export_ratelimit_events_dropped_totalandtetragon_enforcer_missed_notifications_total. - Performance surprises: a broad hook on a hot function with filters only in user space costs CPU on every node.
tetragon_overhead_program_seconds_totalshows per program cost, and--cgroup-rate(for example1000,1s) throttles exec and exit floods per cgroup, emittingTHROTTLEevents. - Kernel drift: hook names change between kernels, as the truncate hook did in 6.2. Re-test policies on every node image upgrade.
- Selector limits: five selectors per hook, four values per matchArgs, prefix strings up to 256 characters. Large allow lists belong in
InMap. - Blind spots by default:
kube-systemis filtered from export by default; attackers who land in system namespaces will not appear unless you change it. - Weak RBAC over policies: anyone who can delete or edit a TracingPolicy can switch off detection. Restrict the CRDs to the platform security team and alert on changes in the Kubernetes audit log. See the Kubernetes RBAC Guide.
Framework mapping
| Framework | Reference | How Tetragon contributes |
|---|---|---|
| NIST CSF 2.0 | DE.CM-09 | Monitoring runtime environments for adverse events |
| NIST SP 800-53 Rev 5 | SI-4 System Monitoring; AU-12 Audit Record Generation | Kernel level process, file and network events |
| NIST SP 800-53 Rev 5 | CM-7 Least Functionality; SI-7 Software, Firmware, and Information Integrity | Enforcement policies that block unexpected binaries, file changes and module loads |
| MITRE ATT&CK v20 | T1611, T1003.008, T1059.004, T1548.001, T1068 | Detections listed in the use case table |
| NIST SP 800-190 | Container runtime risks and countermeasures | Observing and constraining container behaviour at run time |
Practitioner checklist
- Run
tetra probeon each node image and record kernel version, BTF andCONFIG_BPF_KPROBE_OVERRIDEstatus. - Install with Helm, keep gRPC on the Unix socket, and turn on TLS with client certificates for any network listener.
- Restrict create, update and delete on TracingPolicy and TracingPolicyNamespaced to the platform security team and alert on changes.
- Decide whether
kube-systemstays in the export deny list, and document the choice. - Start with sensitive file access, unexpected shells and namespace change policies in monitor mode on a canary pool.
- Enable OCI runtime hooks before relying on namespaced enforcement.
- Switch individual policies to enforce only after a full release cycle of clean monitor counts, with a runtime rollback path tested.
- Ship events to the SIEM with field filters and redaction, and set retention and access controls.
- Alert on missed event and ring buffer loss metrics, and track per program overhead after each policy change.
- Re-test every policy when node kernels or images change.
Standards and references
- Tetragon: Documentation
- Tetragon: Tracing Policy
- Tetragon: Enforcement
- Tetragon: Installation FAQ (kernel and BTF requirements)
- Tetragon: Threat Model
- Cilium: Tetragon GitHub repository
- NIST: SP 800-190 Application Container Security Guide
- Kubernetes: Security concepts
Related NHI Mgmt Group resources: eBPF Security Guide · Container Runtime Security Guide · Kubernetes Security Guide · SIEM Guide