implementing-runtime-security-with-tetragon

Implement eBPF-based runtime security observability and enforcement in Kubernetes clusters using Cilium Tetragon.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill implementing-runtime-security-with-tetragon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-runtime-security-with-tetragon
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/container-security/implementing-runtime-security-with-tetragon
Command: npx skills add https://github.com/xalgord/xalgorix --skill implementing-runtime-security-with-tetragon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kubernetes workloads lack kernel-level visibility, making it hard to detect container escapes, privilege escalation, crypto-miners, and unauthorized access to sensitive files at runtime. This Skill guides you through deploying Cilium Tetragon to observe and enforce security policies directly in the Linux kernel with minimal performance overhead.

Core Features & Use Cases

  • TracingPolicy Authoring: Define eBPF-based TracingPolicy CRDs to monitor process execution, file access, network connections, and dangerous syscalls across all pods.
  • Kernel-Level Enforcement: Block malicious activity in real time using Sigkill, Signal, and Override actions, such as killing crypto-miner binaries or stopping container escape attempts via setns.
  • Observability & SIEM Integration: Stream events with the tetra CLI, export to Elasticsearch, and scrape Prometheus metrics like tetragon_missed_events_total for alerting.
  • Use Case: A security engineer needs to detect and block privilege escalation in production clusters. They install Tetragon via Helm, apply a TracingPolicy matching su/sudo execution outside the host namespace, and verify enforcement by triggering the behavior in a test pod.

Quick Start

Ask the AI to generate a Tetragon TracingPolicy that detects and kills container escape attempts via the setns syscall in my Kubernetes cluster.

Frequently Asked Questions about implementing-runtime-security-with-tetragon

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install Tetragon on a Kubernetes cluster?

Install Tetragon with Helm by adding the cilium repo and running helm install tetragon cilium/tetragon in the kube-system namespace with process credential and namespace flags enabled. Verify with kubectl get pods and the tetra status CLI command.

How do I detect container escape attempts with eBPF?

Create a TracingPolicy that hooks the __x64_sys_setns syscall and matches processes not in the host PID namespace. Set the matchActions to Sigkill to terminate the escaping process directly in the kernel.

What is the difference between Post and Sigkill actions in Tetragon TracingPolicy?

Post only emits an observation event and lets the syscall continue, while Sigkill immediately terminates the offending process for enforcement. Override can also deny operations but requires kernel support for bpf_override_return.

What kernel version does Tetragon require?

Tetragon requires Linux kernel 5.4 or later, with 5.10+ recommended for full eBPF feature support. It also needs Kubernetes v1.24+ and Helm 3.x for installation.

Why is my Tetragon policy not blocking malicious processes?

A policy with only Post actions is observe-only and never blocks; enforcement requires Sigkill, Signal, or Override actions. Also check tetragon_missed_events_total for dropped events and confirm the policy loaded on every node with kubectl get tracingpolicy.

Can Tetragon send security events to a SIEM?

Yes, Tetragon supports exporting events to Elasticsearch via Helm values and exposes Prometheus metrics on port 2112 for alerting. You can also stream JSON events with tetra getevents -o json for custom pipelines.