Cluster component
CrowdSec
Blocks brute-force attempts and scanners before they reach your services.
- Memory when idle
- about 90 MiB
- CI measures it once the app is ready and before any traffic. Leave room for more.
- Tested on
- x86 and ARM servers
- Installed by default
- Optional
Introduction
CrowdSec reads Traefik’s access logs, spots brute-force attempts and scanners, and blocks their addresses before the request reaches a service. A Traefik plugin does the blocking on the web and websecure entry points, so it covers every app behind the ingress and no app opts in.
Install it when your cluster serves the internet through Traefik. It needs Traefik and a component that provides certificates. Installing it also changes Traefik: it adds the plugin, which Traefik downloads from plugins.traefik.io at start, and it keeps each client’s address and user agent in the access log.
The component fails open. If the CrowdSec API is unreachable, Traefik keeps serving traffic. The online API is off, so no data leaves the cluster. The keys it needs are generated for you.
An agent on each node reads /var/log through a read-only host path and runs privileged. Its client certificate can send and read alerts and delete decisions.
Use it
CrowdSec has no Zeabur OSS screen. List what it blocks and what it saw:
kubectl -n crowdsec exec deploy/crowdsec-lapi -- cscli decisions list
kubectl -n crowdsec exec deploy/crowdsec-lapi -- cscli alerts list
See the cscli decisions reference to add or delete decisions.
Remove it
Removal deletes the agents, the local API and the bouncer middleware. The volume with the decisions stays in the crowdsec namespace. Check that the Traefik Pods are healthy after removal: kubectl -n traefik get pods. See Remove components.
Troubleshooting
A real visitor is blocked
Find the address in the decisions and delete it:
kubectl -n crowdsec exec deploy/crowdsec-lapi -- cscli decisions list
kubectl -n crowdsec exec deploy/crowdsec-lapi -- cscli decisions delete --ip <address>
Nothing is ever blocked
Check that the agents run and that they read Traefik’s log:
kubectl -n crowdsec get pods
kubectl -n crowdsec exec ds/crowdsec-agent -- cscli metrics
Technical details
This release
- Provides
- intrusion-prevention
- Licence
- MIT
- Homepage
- crowdsec.net
- Source file
- components/crowdsec/component.yaml @ v0.6.3
Tested in CI
CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.
| Distribution | Platform | Kubernetes | Passed | Idle memory |
|---|---|---|---|---|
| k3s | linux/amd64 | v1.37.2 | 78 MiB | |
| k3s | linux/arm64 | v1.37.2 | 79 MiB | |
| kind | linux/amd64 | v1.37.0 | 90 MiB | |
| kind | linux/arm64 | v1.37.0 | 85 MiB | |
| kubesolo | linux/amd64 | v1.36.6 | 80 MiB | |
| kubesolo | linux/arm64 | v1.36.6 | 81 MiB | |
| rke2 | linux/amd64 | v1.37.2 | 82 MiB | |
| rke2 | linux/arm64 | v1.37.2 | 82 MiB |
Security
The agent reads node log files read-only. Its certificate gives a machine's rights to send and read alerts and to delete decisions.
What it installs
- ca
- crowdsec 0.24.2
- bouncer-middleware
Needs
- Traefik Proxy
- any certificates component