Container Probe
What is a Container Probe?
Container probe allows you to execute commands inside a container and validate the output. It is useful for validating application state, checking file contents, or verifying environment variables within containerized applications. The Container probe is currently supported only on Kubernetes infrastructure that is driven by Harness Delegate.
The usage of a Container probe is exactly the same as other probes where the probe is added in a chaos experiment in one of the probe modes such as Continuous, Edge, SOT or EOT. The probe when successfully executed will result in either SUCCESS or FAILED state and this state contributes to the overall resilience score of the chaos experiment.
When will you use it? Container probes are used when you need to validate application state by executing commands inside containers, check file contents, verify environment variables, or validate that specific processes are running. The Container probe can also be used in combination with other probes such as HTTP, Command, or K8S probes.
Supported Infrastructure Types
Kubernetes HD
YES
Kubernetes
NO
Linux
NO
Windows
NO
Configure Container Probe
Prerequisites
To use the Container probe, you need:
A Kubernetes cluster with Harness Delegate installed
Access to the target container where commands will be executed
Appropriate RBAC permissions to execute commands in pods/containers
The container image must be available and accessible from the cluster
Steps to configure
In the Probes & Actions section under the chaos module, click on + New Probe button
Select Container Probe from the probe type selection dialog

Provide the name of the probe and optional description and tags

Click on Configure Details to proceed to the next step
Under Probe Properties, configure the following:
Container Image: Specify the container image to use (e.g.,
bitnami/kubectl:latest,busybox:latest,alpine:latest)Command: Specify the command to execute inside the container as an array (e.g.,
/bin/sh,-c)Arguments: Provide the actual command or script to execute (e.g.,
echo "Hello World")Environment Variables (optional): Add environment variables as key-value pairs
Namespace: Specify the Kubernetes namespace (default:
default)Image Pull Policy: Define when to pull the image (
IfNotPresent,Always,Never)
Configure Advanced Configuration (optional):
Service Account Name: Kubernetes service account to use
Image Pull Secrets: Secrets for private registries
Labels and Annotations: Custom metadata for the probe container
Node Selector: Node selection constraints
Tolerations: Allow scheduling on nodes with matching taints
Node Affinity: Required or preferred node affinity rules
Resource Limits: Set memory and CPU limits (e.g.,
512Mi,500m)Resource Requests: Set memory and CPU requests (e.g.,
256Mi,100m)
Configure Volumes (optional):
Add volumes to mount into the probe container with volume name, mount path, and volume source
Configure Volume Mounts (optional):
Specify additional volume mounts with name, mount path, and optional sub path
Configure Security Configuration (optional):
Host Network, HostPID, Host IPC: Use host namespaces
Allow Privilege Escalation: Allow gaining more privileges
Read Only Root Filesystem: Mount root filesystem as read-only
Privileged: Run in privileged mode
Run As Non Root: Ensure non-root execution
Run as user and Run as group: Specify user and group IDs
FS Group: Filesystem group ID for volume ownership
Provide the comparison criteria under Data Comparison:
Type: Select data type (
String,Int,Float)Comparison Criteria: Select operator (
matches,==,!=,>,<,>=,<=)Value: Enter the expected value to compare against
Configure Run Properties:
Timeout: Maximum time for probe execution (e.g.,
10s)Interval: Time between successive executions (e.g.,
2s)Attempt: Number of retry attempts (e.g.,
1)Polling Interval: Time between retries (e.g.,
30s)Initial Delay: Delay before first execution (e.g.,
5s)Verbosity: Log detail level
Stop On Failure: Stop experiment if probe fails
Click on Create Probe to save the container probe configuration
Next Steps
Learn about Probe Modes to understand when probes execute
Explore Other Probe Types for different validation scenarios
Create Chaos Experiments with Container probes
Last updated
Was this helpful?