Kubernetes Probe
Configure Kubernetes probes to verify resource state during chaos experiments
K8s Probe verifies the desired state of Kubernetes resources by allowing you to define the resource GVR (group-version-resource) with appropriate filters (field selectors or label selectors). The probe supports three operations:
present: Checks that matching Kubernetes resources exist
absent: Checks that matching Kubernetes resources do not exist
delete: Deletes matching Kubernetes resources
When to use
Verify that pods remain in
Runningstate during a fault (usepresentwith field selectorstatus.phase=Running)Confirm that a Kubernetes resource (e.g., PVC, ConfigMap) is cleaned up after a fault (use
absent)Delete specific resources as part of experiment teardown (use
delete)Validate that custom resources or operator-managed resources maintain their expected state under failure conditions
Steps to configure
Navigate to Project Settings > Chaos Probes and click + New Probe
Select Kubernetes Probe and provide a name, and optionally a description and tags
Under Variables, define any reusable values you want to reference in probe properties or run properties. For each variable, specify the type (
StringorNumber), name, value (fixed or runtime input), and whether it's required at runtime.Under Probe Properties, configure:
FieldDescriptionKubernetes Resource Group
The API group of the resource (leave empty for core resources like pods, services)
Version
The API version (e.g.,
v1,v1alpha1)Resource
Kind of resource (e.g.,
pods,deployments,persistentvolumeclaims)Resource Names (optional)
Comma-separated resource names to target
Namespace
The namespace to target (e.g.,
default)Field Selector (optional)
Filter by field values (e.g.,
status.phase=Running)Label Selector (optional)
Filter by labels (e.g.,
app=nginx)Operation
The operation type:
present,absent, ordeleteProvide the Run Properties:
FieldDescriptionTimeout
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 (optional)
Stop the experiment if the probe fails
Click Create Probe
Last updated
Was this helpful?