iac.htora.dev · security templates

Home/Templates/See what containers are doing while they run

See what containers are doing while they run

Runtime alerts installed by the same pipeline that ships the workloads, so they cannot fall behind.

Argo CD

Why bother

Runtime security installed by hand drifts away from the cluster it is meant to watch, and disappears the next time the cluster is rebuilt. Shipping it through the same pipeline as everything else keeps them together.

How you know it worked

Open a shell inside a pod. The alert should reach your SIEM.

How it works

1A process starts in a containera shell, or a read of a token2Falco on that nodesees the system call through eBPF3A rule matchesrules come from Git, never from auto-updates4Falcosidekicksends the alert to your SIEM
Step by step, from the thing that happens to the result you want.

Set it up

Pick your platform, then open the level you want. Each level is complete on its own. Read the comments in the files as you go. Anything with a real consequence is explained on the line where it happens.

Argo CD. Falco deployed by Argo CD, with rules kept in Git

What you need first

  • A cluster where a privileged DaemonSet is permitted. Falco reads system calls, which is the whole point and also the trade.
  • Kernel 5.8 or later for the eBPF driver. Older kernels need the kernel module instead.
  • Somewhere for alerts to go. The Standard version expects a webhook in a Secret.

What it creates

  • A falco namespace and a DaemonSet on every node
  • Falcosidekick, which fans one alert out to several destinations
  • A ConfigMap of local rules, synced from Git by Argo CD and mounted into every Falco pod (Standard)

See the two alerts this creates

The code

Quick startReadyone file, 65 lines
One Application, the chart defaults, alerts to the pod log. Enough to watch it fire once.
Run it
  1. kubectl config current-context
    Shows which cluster kubectl is pointed at. Check it first.
  2. kubectl apply -f falco.yaml
    Hands the Application to Argo CD.
  3. kubectl -n argocd get applications
    Lists applications with their sync and health status.
Download falco.yaml
Checks

Kubernetes schema passed

Last run 2026-10-02.

outcomes/k8s-runtime-security/kubernetes/t0
falco.yaml
Open falco.yaml as plain text
StandardReadyfour files, 183 lines
One Application with three sources: the pinned chart, values from your repository, and a rules folder Argo CD syncs and Falco mounts. Rule updates off, alerts to a SIEM, and two rules worth having: a shell in production and a service account token read by the wrong process.
Change these first
  • - repoURL: https://github.com/your-org/your-cluster-config.git application.yaml, line 38
  • - repoURL: https://github.com/your-org/your-cluster-config.git application.yaml, line 42
Run it
  1. kubectl config current-context
    Shows which cluster kubectl is pointed at. Check it first.
  2. kubectl apply -k .
    Applies everything the kustomization lists, in order.
  3. kubectl -n argocd get applications
    Lists applications with their sync and health status.
Download all four files as a zip
Checks

Kubernetes schema passedBuilds passed

Last run 2026-10-02.

outcomes/k8s-runtime-security/kubernetes/t1
application.yaml
Open application.yaml as plain text
kustomization.yaml
Open kustomization.yaml as plain text
rules/falco-local-rules.yaml
Open falco-local-rules.yaml as plain text
values.yaml
Open values.yaml as plain text
HardenedReadyone file, 15 lines
Standard's manifests, unchanged. Rules refuse a missing application, rules, or values, unpinned charts, sync without prune or self-heal, automatic rule downloads, unmounted local rules, alert forwarding off, and a removed or disabled local rule. A daily diff against the cluster reports drift.
Run it
  1. kubectl config current-context
    Shows which cluster kubectl is pointed at. Check it first.
  2. kubectl apply -k .
    Applies everything the kustomization lists, in order.
  3. kubectl -n argocd get applications
    Lists applications with their sync and health status.
Download kustomization.yaml
Checks

Builds passed

Last run 2026-10-02.

outcomes/k8s-runtime-security/kubernetes/t2
kustomization.yaml
Open kustomization.yaml as plain text
What catches people

A rules ConfigMap does nothing on its own. Falco reads files from a folder, so the ConfigMap has to be mounted into that folder. Skip the mount and there is no error, and no alerts from your rules either. The Standard values.yaml mounts it.

With rule updates left on, the rules your cluster alerts on change whenever upstream publishes, and the question of why an alert started firing stops having an answer. The Standard version turns them off.

How to undo it

Delete the Application. The eBPF driver installs nothing on the host, so there is nothing left behind on the nodes.

What it costs

A pod per node, roughly 100m of CPU and 512Mi of memory each. The larger cost is usually the alert volume on the receiving side, which is why the Standard rules narrow the noisy defaults and keep them running.

Registry 0.23.0. Built 2026-11-17.

Made by Habibullah Tora. Source on GitHub. Code under the MIT licence, writing under CC BY 4.0.