Docker · Kubernetes · Swarm

Container security
for Docker & Kubernetes

Your nodes still run SSH. Your ingress still receives attacks. Your containers still need protection at the host level. Defensia deploys as a container and protects the entire node.

Deploy in one command

Choose your platform. The agent auto-registers and starts protecting immediately.

DOCKER

Single container

docker run -d --name defensia-agent --restart unless-stopped \

--privileged --net=host --pid=host \

-v /var/log:/var/log:ro \

-v /var/run/docker.sock:/var/run/docker.sock:ro \

-v /etc/defensia:/etc/defensia \

-e DEFENSIA_TOKEN=<TOKEN> \

ghcr.io/defensia/agent:latest

Also available on Docker Hub: defensiacloud/agent

SWARM

Docker Swarm (1 agent per node)

echo "<ORG_API_KEY>" | docker secret create defensia_api_key -

docker stack deploy -c docker-compose.swarm.yml defensia

Deploys as a global service. One Organization API Key registers every node (install tokens are single-use). Stack file in the installation docs.

K8S

Kubernetes via Helm

helm install defensia-agent \

oci://ghcr.io/defensia/charts/defensia-agent \

--set apiKey=<ORG_API_KEY>

DaemonSet — 1 agent per node, including control-plane. Tolerates all taints.

Configure with Docker labels

No config files. Just add labels to your containers and Defensia auto-detects what to monitor.

# docker-compose.yml

services:

  nginx:

    image: nginx

    labels:

      defensia.monitor: "true"

      defensia.log-path: "/var/log/nginx/access.log"

      defensia.domain: "example.com"

defensia.monitor

Force-include or exclude a container from monitoring (true/false).

defensia.log-path

Explicit host log path(s). Skips auto-detection. Comma-separated.

defensia.domain

Associate domain names with this container's logs. Comma-separated.

defensia.waf

Informational flag — WAF on/off is controlled from the dashboard.

What Defensia protects in containerized environments

The agent runs on the node and monitors everything — host-level and container-level threats.

SSH brute force on the node

15 detection patterns covering auth failures, pre-auth scanning, and protocol mismatches.

Web attacks via Ingress/proxy logs

Reads Nginx/Apache logs from containers. Detects SQLi, XSS, path traversal, RCE, and 15+ OWASP types.

Bot detection & management

70+ bot fingerprints with per-org policies: allow, log, or block.

Docker container inventory

Reports all running containers, images, and status to the dashboard.

Server metrics & health

CPU, memory, disk, network, zombie processes — reported every 60 seconds.

CVE vulnerability scanning

Detects vulnerable packages and matches against NVD, EPSS, and CISA KEV.

Defensia vs other container security tools

Most container security tools focus on runtime detection only. Defensia covers the full stack.

FeatureDefensiaFalcoBunkerWeb
SSH protection✓——
Web Application Firewall✓—✓
Bot detection✓—✓
Server metrics✓——
CVE scanning✓——
Multi-server dashboard✓——
Docker label autoconf✓—✓
Helm chart✓✓✓
Auto IP blocking✓—✓
Lightweight (~40MB)✓——

Frequently asked questions

How does Defensia protect Docker containers?

Defensia runs on the host machine (or as a privileged container) and reads container logs, monitors exposed ports, and detects attacks on web services running inside containers. It blocks attackers at the host firewall level using iptables/ipset.

Does Defensia work with Docker Compose?

Yes. Add Defensia as a service in your docker-compose.yml with privileged mode and host networking. It auto-detects other containers and their exposed services.

Can I deploy Defensia on Kubernetes?

Yes. Deploy via Helm chart as a DaemonSet — one agent per node. It reads ingress controller logs, monitors pod events, audits NetworkPolicy, and protects SSH on every node. See the Kubernetes Security page for details.

Does it work on k3s, RKE2 or MicroK8s?

Yes, and it is verified on k3s rather than assumed. These distributions keep the containerd socket outside containerd's upstream default path — k3s uses /run/k3s/containerd/containerd.sock — so chart 0.7.0 and earlier left the DaemonSet pod stuck in ContainerCreating on them. Chart 0.7.1 does not mount that socket at all, because nothing in the agent reads it. Tested on a two-node k3s v1.35.5 cluster with containerd 2.2.3: both pods Running, no failed mounts. RKE2, MicroK8s and CRI-O nodes keep their sockets in other places again and are unaffected for the same reason.

Does the agent inventory the node, or its own container?

The node. This is worth asking because it was wrong until agent 1.4.108: running as a DaemonSet, the agent read its own Alpine image and reported every node as alpine 3.20.10. It now reads the node's filesystem through PID 1 and takes software versions from the node's own package database rather than from binaries that belong to its image. On a node with no package manager — an RPM node, or an immutable one like Flatcar or Bottlerocket — it reports the OS and says it cannot read packages, rather than reporting an empty machine.

Does Defensia monitor container health?

Yes. The agent detects Docker version, lists running containers, identifies web containers by port/image/label heuristics, and reports this data to the dashboard. Container info appears in the Docker tab of each server.

What is the difference between Defensia and Falco?

Falco monitors system calls at the kernel level (syscall tracing). Defensia reads application logs (nginx, SSH, mail) and blocks IPs at the firewall level. They operate at different layers and complement each other — Falco detects kernel-level anomalies, Defensia blocks network attacks.

Secure your containers today

Free tier available. Deploy on Docker, Swarm, or Kubernetes in under a minute.

Get Started Free