What is Falco? Kubernetes runtime security explained

What is Falco? It's the CNCF's runtime security project: a tool that watches what your containers, hosts and Kubernetes clusters actually do while they run, and raises an alert when something looks wrong. A shell opening inside a production container, a process reading /etc/shadow, a write under /etc: Falco is built to notice those in real time.
Falco is a graduated CNCF project, and runtime threat detection is a fifth of the CKS exam. If you're studying for CKS or running clusters where "what is happening right now" matters, it's one of the projects to know. You'll find what we've written about it on our Falco project page.
Key points
- Falco detects suspicious behaviour at runtime, mainly from Linux kernel events, enriched with container and Kubernetes metadata.
- Rules are YAML: a condition, an output message and a priority. Falco ships with a default rule set.
- The default driver is the modern eBPF probe; a kernel module is the alternative.
- Falco detects and alerts. It doesn't block, which makes it different from admission controllers such as Kyverno.
- It joined CNCF on 10 October 2018 and graduated on 29 February 2024.
What is Falco and what problem does it solve?
Most Kubernetes security work happens before a workload runs: scanning images, signing artefacts, admission policies, Pod Security Standards. All of that matters, but none of it tells you what a container does once it's running. A compromised dependency, a stolen credential or a mistake in an image only shows itself at runtime.
Falco fills that gap. In its own words, it is "the de facto Kubernetes threat detection engine". It observes events as they happen, compares them with rules, and sends an alert you can act on.
Maturity: from sandbox to graduated
Falco was created by Sysdig and accepted into CNCF on 10 October 2018. It moved to incubating on 8 January 2020 and graduated on 29 February 2024, according to its CNCF project page. Graduated is CNCF's highest maturity level, the same level as Kubernetes, Prometheus and Helm.
How Falco works
Falco has four parts worth knowing.
Event sources. Falco mainly watches Linux kernel events (system calls). Plugins add other sources, such as Kubernetes audit logs, AWS CloudTrail and Okta. Each event is enriched with metadata from the container runtime and Kubernetes, so an alert tells you the pod, namespace and image, not just a process id.
Drivers. A driver streams kernel events to Falco. The default is the modern eBPF probe, built on CO-RE so it works across kernel versions without compiling per host. The other option is a kernel module.
Rules. Rules decide when an alert fires. Each one has five required keys: rule, desc, condition, output and priority. Macros and lists let you reuse pieces of conditions.
Outputs. Alerts can go to standard output, a file, syslog, a program, or an HTTP(S) endpoint. Falcosidekick, a companion project, forwards Falco events to many more destinations such as chat, SIEMs and queues.
There's also falcoctl, a bundled tool for installing and updating rules and plugins.
A Falco rule example
This is the example rule from the Falco documentation. It fires when bash or ksh starts inside a container:
- rule: shell_in_container
desc: notice shell activity within a container
condition: >
(evt.type in (execve, execveat)) and
container.id != host and
(proc.name = bash or
proc.name = ksh)
output: >
shell in a container |
user=%user.name container_id=%container.id container_name=%container.name
shell=%proc.name parent=%proc.pname cmdline=%proc.cmdline
priority: WARNING
Read it as: "when a process is executed, outside the host, and its name is bash or ksh, print this message at WARNING". Priorities run from EMERGENCY down through ALERT, CRITICAL, ERROR, WARNING, NOTICE and INFORMATIONAL to DEBUG.
Reusable pieces look like this:
- list: shell_binaries
items: [bash, csh, ksh, sh, tcsh, zsh, dash]
- macro: container
condition: (container.id != host)
A list can include earlier lists, and a macro can use earlier macros and any list, so large rule sets stay readable.
Falco and similar projects
Falco is often mentioned next to tools that do different jobs, so it helps to place it.
- Admission control (Kyverno, OPA Gatekeeper): these check a resource before it's created and can reject it. Falco looks at behaviour after the workload is running. Most clusters want both. Our Kyverno explainer covers the admission side.
- Kernel hardening (seccomp, AppArmor): these restrict what a process is allowed to do. Falco tells you what it tried to do. The CKS curriculum lists both in the same domain.
- Other eBPF runtime tools: Tetragon, from the Cilium community, also uses eBPF for runtime visibility and can enforce as well as observe. If you already run Cilium it's worth comparing, but Falco's large default rule set and plugin sources are why many teams start with it.
- Prometheus and logging: Falco isn't a monitoring tool, but its alerts often end up in the same places. Falcosidekick can forward them to most common destinations.
Falco and the CKS exam
The CKS curriculum gives 20% to "Monitoring, Logging and Runtime Security". Its topics include performing behavioural analytics to detect malicious activities, detecting threats within workloads, investigating phases of an attack and ensuring immutability of containers at runtime. The curriculum doesn't name a tool for this, but Falco is the CNCF project built for exactly that job, and practising with it is the most direct way to make those topics concrete.
Know how to read a Falco rule, change its output or priority, find alerts in the logs, and work out which container caused one. Our CKS exam guide covers the rest of the exam, and the CKS discount page lists current offers.
How to get started with Falco
The Falco Kubernetes quickstart takes a few minutes on a local cluster (kind or minikube is fine):
helm repo add falcosecurity https://falcosecurity.github.io/charts
helm repo update
helm install --replace falco --namespace falco --create-namespace \
--set tty=true falcosecurity/falco
Start a test workload, then do something suspicious in it:
kubectl create deployment nginx --image=nginx
kubectl exec -it $(kubectl get pods --selector=app=nginx -o name) -- cat /etc/shadow
kubectl logs -l app.kubernetes.io/name=falco -n falco -c falco | grep Warning
You should see an alert from the default rule "Sensitive file opened for reading by non-trusted program", with the pod and container in the message. From there, write your own rule in a custom rules file and watch it fire.
Pro tip: run Falco for a day on a test cluster before writing rules. The default alerts show you what "normal" looks like, and most real rule work is tuning out noise.
For more, the Falco docs cover installation with the operator, Helm, packages or a container. Our Falco project page will collect future posts about it.
FAQ
What is Falco used for? Runtime threat detection: spotting suspicious behaviour in containers, hosts, Kubernetes and cloud services as it happens, and alerting on it.
Is Falco free and open source? Yes. It's a graduated CNCF project, and the source is on GitHub under the falcosecurity organisation.
Does Falco block attacks? No. Falco detects and alerts. To respond automatically you connect its alerts to other tools.
Does Falco need a kernel module? Not by default. The default driver is the modern eBPF probe; the kernel module is an alternative for environments that need it.
Is Falco on the CKS exam? The CKS curriculum doesn't name specific tools for runtime security, but it tests behavioural detection and investigating attacks, which is what Falco does. Practising with it is a common way to prepare.
Install it on a test cluster this week, trigger your first alert, and you'll understand runtime security far better than from reading about it.