To install Falco on Linux, you can download a shell script that takes care of the necessary steps:
curl -o install_falco -s https://falco.org/script/install
Then verify the SHA256 checksum of the script using the
sha256sum tool (or something analogous):
It should be
Then run the script either as root or with sudo:
sudo bash install_falco
The easiest way to use Falco on Kubernetes in a local environment is on Minikube. Both the Kubernetes YAML manifests and the Helm chart are regularly tested with Minikube.
minikube with the default
--driver arguments, Minikube creates a VM that runs the various Kubernetes services and a container framework to run Pods, etc. Generally, it’s not possible to build the Falco kernel module directly on the Minikube VM, as the VM doesn’t include the kernel headers for the running kernel.
To address this, starting with Falco 0.13.1 we pre-build kernel modules for the last 10 Minikube versions and make them available at https://s3.amazonaws.com/download.draios.com. This allows the download fallback step to succeed with a loadable kernel module.
Going forward, we’ll continue to support 10 most recent versions of Minikube with each new Falco release. We currently retain previously-built kernel modules for download, so we will continue to provide limited historical support as well.
Also see this blog post on how to set up Falco with Minikube
The easiest way to run Falco on a Kind cluster is as follows:
Create a configuration file. For example:
Add the following to the file:
kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane extraMounts: - hostPath: /dev containerPath: /dev
- Create the cluster by specifying the configuration file:
kind create cluster --config=./kind-config.yaml
- Install Falco in your Kubernetes cluster with kind.
@juju4 has helpfully written an Ansible role for Falco,
juju4.falco. It’s available on GitHub and Ansible Galaxy. The latest version of Ansible Galaxy (v0.7) doesn’t work with Falco 0.9, but the version on GitHub does.
The recommended way to run Falco on CoreOS is inside of its own Docker container using the install commands in the Docker section. This method allows full visibility into all containers on the host OS.
This method is automatically updated, includes some nice features such as automatic setup and bash completion, and is a generic approach that can be used on other distributions outside CoreOS as well.
However, some users may prefer to run Falco in the CoreOS toolbox. While not the recommended method, this can be achieved by installing Falco inside the toolbox using the normal installation method, and then manually running the
toolbox --bind=/dev --bind=/var/run/docker.sock curl -s https://falco.org/script/install | bash falco-driver-loader
Google Kubernetes Engine (GKE) uses Container-Optimized OS (COS) as the default operating system for its worker node pools. COS is a security-enhanced operating system that limits access to certain parts of the underlying OS. Because of this security constraint, Falco cannot insert its kernel module to process events for system calls. However, COS provides the ability to leverage eBPF (extended Berkeley Packet Filter) to supply the stream of system calls to the Falco engine.
Falco can use eBPF with minimal configuration changes. To do so, set the
FALCO_BPF_PROBE environment variable to an empty value:
eBPF is currently supported only on GKE and COS, however here we provide installation details for a wider set of platforms
FALCO_BPF_PROBEto the path of an existing eBPF probe.
When using the official container images, setting this environment variable will trigger the
falco-driver-loader script to download the kernel headers for the appropriate version of COS, and then compile the appropriate eBPF probe. In all the other environments you can call the
falco-driver-loader script yourself to obtain it in this way:
sudo FALCO_VERSION="0.23.0" FALCO_BPF_PROBE="" falco-driver-loader
To execute the script above successfully, you will need
If you are installing Falco from packages, you will need to edit the
falco systemd unit.
You can do that by executing the following command:
systemctl edit falco
It will open your editor, at this point you can set the environment variable for the unit by adding this content to the file:
Table of contents