Deploy and manage Kubernetes cluster sensors
Container Runtime Security uses an eBPF -based (extended Berkeley Packet Filter) runtime sensor to detect the following activity for Kubernetes clusters you want to monitor:
- Container runtime events
- Syscall activity
- Process execution chains
- File access patterns
- Network activity
- Short-lived and ephemeral containers that may not appear in periodic CSPM snapshots
The runtime sensor includes anti-tampering protections to prevent:
- Unauthorized modification of configuration
- Disabling of detection components
- Interference with operational state
These safeguards ensure runtime security controls remain active and reliable. The runtime detection engine includes three primary components:
Anomaly detection
Anomaly detection identifies deviations from normal application behavior.
During a learning phase, the system:
- Observes container activity.
- Records file access, network connections, system calls, and related behavior.
- Stores this information in
ApplicationProfileorNetworkNeighborhoodcustom resources (CRDs).
After the learning phase completes, real-time events are compared against the stored baseline. Deviations trigger alerts.
Behavioral analysis
Behavioral analysis uses predefined rules to detect known attack patterns, such as:
- Reverse shell activity
- Execution of unexpected binaries
- Suspicious system calls
- Privilege escalation behavior
- Execution of binaries not present in the container image
Rules can be bound to workloads using Kubernetes selectors.
By default, rules apply to all workloads unless scoped otherwise.
Malware scanning
Nodes can be scanned for malware using an integrated antivirus engine.
Scanning supports:
- Files
- Directories
- Volumes
To reduce resource usage, a curated malware signature database optimized for Kubernetes environments is used.
Before you begin
To deploy the sensor, you need the following on each Kubernetes cluster you want to monitor:
Large Kubernetes cluster or having resource issues?
If your Kubernetes clusters do not meet the resource requirements or you’re having trouble deploying the sensor, contact Rapid7 support.
Deploy a sensor
After your Kubernetes cluster has been prepared for the sensor, you’re ready to deploy it using Helm.
Use the Command Platform to access Container Runtime Security
Access Container Runtime Security from the Command Platform to authenticate and take action on findings. If you open Cloud Security outside the Command Platform, you can view detections, but some features are unavailable.
To deploy a sensor:
- Log in to the Command Platform .
- Go to Controls & Compliance > Runtime.
- Click Manage Rules and Policies. The Container Runtime Security feature opens to the Threat Detection page.
- Go to Settings > Accounts.
- Click Kubernetes.
- Click Copy.
-
Optionally, adjust the max learning period for anomaly detection using the following line (default is 24 hours):
--set nodeAgent.config.maxLearningPeriod=Xh
-
- Open a cloud shell or terminal with access to your Kubernetes cluster.
- Paste and run the
helmcommand. - When the command is finished, return to the Container Runtime Security feature.
- Click Verify installation. Rapid7 will verify it can connect to the cluster and automatically scan it.
The sensor first learns how your cluster typically behaves, then cluster activity will automatically begin to appear in the Command Platform.
Want to adjust workload-specific learning period instead?
You can also define a workload-specific learning period using a label:
metadata:
labels:
kubescape.io/max-sniffing-time: "5m"Manage sensors
After you have added a sensor, you can review or upgrade a sensor, delete a sensor, or trigger a scan.
To view sensors:
- Log in to the Command Platform .
- Go to Controls & Compliance > Runtime.
- Click Manage Rules and Policies. The Container Runtime Security feature opens to the Threat Detection page.
- Go to Settings > Accounts.
Click a table row to open sensor details.
To delete a sensor:
- Log in to the Command Platform .
- Go to Controls & Compliance > Runtime.
- Click Manage Rules and Policies. The Container Runtime Security feature opens to the Threat Detection page.
- Go to Settings > Accounts.
- Click Menu (…).
- Click Delete.
- Click Delete again.
To upgrade a sensor:
- Log in to the Command Platform .
- Go to Controls & Compliance > Runtime.
- Click Manage Rules and Policies. The Container Runtime Security feature opens to the Threat Detection page.
- Go to Settings > Accounts.
- Click Upgrade Available.
- Copy the code and paste it into a cloud shell or terminal for the related cluster.
To trigger a scan:
- Log in to the Command Platform .
- Go to Controls & Compliance > Runtime.
- Click Manage Rules and Policies. The Container Runtime Security feature opens to the Threat Detection page.
- Go to Settings > Accounts.
- Click Menu (…).
- Click Scan.