Providers

Providers determine how ZombieNet spawns and manages nodes. Choose based on your environment and requirements.

Quick Comparison

ProviderRuns AsImage RequiredResource Limits
NativeLocal processesNoNo
DockerContainersYesNo
KubernetesK8s podsYesYes

Provider Selection

Set the default provider via environment variable:

export ZOMBIE_PROVIDER=native  # or: docker, k8s

Or specify per-command with --provider flag. Default is docker.


Native

Runs nodes directly on your machine as local processes.

Requirements

  • Node binaries in PATH (e.g., polkadot, polkadot-parachain)
  • Or specify absolute paths in configuration

Usage

CLI:

zombie-cli spawn network.toml --provider native

Programmatically:

#![allow(unused)]
fn main() {
let network = config.spawn_native().await?;
}

Notes

  • Fastest startup, no container overhead
  • No container images needed
  • Ports are assigned randomly to avoid conflicts
  • Files stored in a temp directory (or base_dir if configured)

Docker

Runs nodes in Docker containers.

Requirements

  • Docker or Podman installed and running
  • Container images with node binaries

Usage

CLI:

zombie-cli spawn network.toml --provider docker

Programmatically:

#![allow(unused)]
fn main() {
let network = config.spawn_docker().await?;
}

Default Images

Override via environment variables:

VariableDefaultDescription
POLKADOT_IMAGEdocker.io/parity/polkadot:latestRelay chain nodes
CUMULUS_IMAGEdocker.io/parity/polkadot-parachain:latestParachain collators
MALUS_IMAGEdocker.io/paritypr/malus:latestMalus (malicious node)
COL_IMAGEdocker.io/paritypr/colander:latestColander

Kubernetes

Deploys nodes as Kubernetes pods.

Requirements

  • Kubernetes cluster access
  • kubectl configured with valid kubeconfig
  • Container images accessible to the cluster

Usage

CLI:

zombie-cli spawn network.toml --provider k8s

Programmatically:

#![allow(unused)]
fn main() {
let network = config.spawn_k8s().await?;
}

Attaching to Running Networks

Reconnect to a previously spawned network, currently running network using the zombie.json state file:

#![allow(unused)]
fn main() {
use zombienet_sdk::{AttachToLive, AttachToLiveNetwork};

// Native
let network = AttachToLiveNetwork::attach_native("/tmp/zombie-1/zombie.json".into()).await?;

// Docker
let network = AttachToLiveNetwork::attach_docker("/tmp/zombie-1/zombie.json".into()).await?;

// Kubernetes
let network = AttachToLiveNetwork::attach_k8s("/tmp/zombie-1/zombie.json".into()).await?;
}

The zombie.json file is written to the network's base directory after spawn completes.