Define a Tetragon TracingPolicyNamespaced to scope a kprobe policy to a single Kubernetes namespace without cluster-admin privileges

domain: tetragon.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a manifest with apiVersion: cilium.io/v1alpha1 and kind: TracingPolicyNamespaced instead of TracingPolicy
  2. Set the manifest's namespace in metadata.namespace to the target Kubernetes namespace
  3. Define the kprobe or tracepoint spec identically to a cluster-scoped TracingPolicy; Tetragon automatically restricts event matching to pods in that namespace
  4. Apply with kubectl apply -n <namespace> -f policy.yaml; the resource is namespaced and can be managed by namespace admins without cluster-admin
  5. Verify the policy appears in kubectl get tracingpolicynamespaced -n <namespace>
  6. Confirm that events from pods outside the namespace are not generated by the policy

Known gotchas

Related routes

Define a Cilium Tetragon TracingPolicy with a kprobe to monitor exec of specific binaries
tetragon.io · 6 steps · unrated
Write a Tetragon TracingPolicy using a kprobe on tcp_connect to monitor outbound TCP connections at the process level
tetragon.io · 6 steps · unrated
Write a Tetragon TracingPolicy to monitor opens of sensitive files using a kprobe and matchArgs path filtering
tetragon.io · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans