Prerequisites
- Ubuntu-based virtual machine (18.04+).
- Kubernetes cluster up and running.
kubectlconfigured to talk to your cluster.- Root or sudo privileges.
1. Install Falco on Ubuntu
First, add the Falco repository, import its GPG key, update package lists, install kernel headers, and then install Falco:Installing kernel headers is required for the Falco DKMS module to build against your running kernel.
2. Verify the Installation
-
Check Falco service status
Falco may run as a daemon or via a container, depending on your setup.
-
Inspect the configuration directory
You should see:
-
Stream Falco logs
3. Generate a Kubernetes Alert
Open two terminal windows:-
Terminal A: Stream Falco logs
-
Terminal B: Trigger an alert
%proc.cmdline, %user.name, %container.name, %k8s.pod.name, %k8s.ns.name, and %container.image.
4. Inspect the Alert Rule
Falco’s built-in rules are defined infalco_rules.yaml. To view the rule that detects terminal shells in containers:
in_container and lists such as shell_binaries are defined elsewhere in the configuration. For full details on writing and customizing rules, see the Falco documentation.
5. Next Steps
We recommend integrating Falco with a centralized dashboard or SIEM to manage alerts at scale. In the next tutorial, we’ll cover:- Deploying Falco Manager and Falco Plugins.
- Sending alerts to a web UI (e.g., Grafana, Kibana).
- Custom rule authoring for advanced threat detection.