Scenario Architecture
Follow a scenario from registry metadata and typed inputs to execution against a target cluster.
Develop a scenario once, then expose it through a container image that Krkn’s clients can discover and configure. This guide follows the full path from a Python plugin to an execution managed by Krkn Operator.
The example is deliberately small: wait for a configurable number of seconds,
list pods in a namespace through krkn-lib, and report success or failure. It
lets you verify the integration without introducing a disruptive experiment.
Companion repository: krkn-chaos/krkn-dev-demo contains the plugin skeleton, container files, and Kind and registry configuration used throughout the lab.
Build a custom scenario takes you through four stages:
The lab builds a standalone scenario image from a custom Krkn base image. It does not require a krkn-hub checkout or a rebuild of krknctl or the operator. Target registration is supplied by the participant and is outside the lab.
Read Scenario architecture for the responsibilities of the registry, operator, node runtime, image startup script, Python plugin, and target cluster.
For upstream changes, follow the contribution guidelines and include the scenario’s documentation and relevant tests. Development questions are welcome in #krkn on Kubernetes Slack.
Follow a scenario from registry metadata and typed inputs to execution against a target cluster.
Build, package, publish, and run a small custom Krkn plugin with Podman, Kind, and Krkn Operator.
Naming, discovery, method signatures, and configuration binding for Krkn scenario plugins.
Define discoverable scenario images with OCI labels and krknctl input descriptors.
Reuse the cluster clients provided to scenario plugins and contribute shared Kubernetes and OpenShift helpers.
Verify plugin behavior, the image contract, container startup, and operator execution as separate stages.
Add focused unit tests and functional coverage to the Krkn test suites.
Add a scenario to the community image collection after validating its standalone image contract.
How to use and create health check plugins in Krkn to monitor services during chaos experiments