Configs2026年7月20日·1 分钟阅读

Pumba — Chaos Testing for Docker Containers

Pumba is a chaos testing and network emulation tool for Docker containers. It can kill, pause, stop, and remove running containers, and inject network failures such as latency, packet loss, and bandwidth limits to test application resilience.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Pumba
直接安装命令
npx -y tokrepo@latest install 7c69e9b3-8438-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Pumba is an open-source chaos testing tool designed specifically for Docker environments. Inspired by Netflix's Chaos Monkey, it brings resilience testing to container workloads by randomly killing, pausing, or stopping containers and injecting network faults. Pumba helps development teams verify that their containerized applications handle infrastructure failures gracefully before those failures occur in production.

What Pumba Does

  • Kills, stops, pauses, and removes Docker containers on a configurable schedule
  • Injects network latency, packet loss, bandwidth limits, and corruption into container traffic
  • Targets containers by name, label, or random selection with regex pattern matching
  • Runs as a single binary or as a Docker container alongside your application stack
  • Supports one-shot and recurring chaos experiments with configurable intervals

Architecture Overview

Pumba connects to the Docker daemon via the Docker API to discover and manipulate running containers. For container-level chaos (kill, stop, pause), it issues Docker API calls directly. For network emulation, Pumba uses Linux tc (traffic control) and netem inside the target container's network namespace. It operates as a standalone process with no server component, reading configuration from command-line flags.

Self-Hosting & Configuration

  • Install via go install, download a prebuilt binary, or run as a Docker container
  • Target specific containers with --name regex patterns or Docker labels
  • Set chaos intervals with --interval for recurring experiments
  • Limit chaos duration with --duration to automatically restore normal behavior
  • Run Pumba itself as a Docker container: docker run gaiaadm/pumba kill --interval 60s

Key Features

  • Container chaos: kill, stop, pause, and remove with configurable signals and grace periods
  • Network emulation: delay, loss, corruption, duplication, and bandwidth throttling via netem
  • Flexible targeting using container name patterns, labels, or random selection
  • Dry-run mode to preview which containers would be affected without executing
  • Lightweight single binary with no external dependencies beyond Docker

Comparison with Similar Tools

  • Chaos Mesh — Kubernetes-native chaos platform; Pumba targets Docker containers directly
  • LitmusChaos — Full chaos engineering platform for K8s; Pumba is simpler and Docker-focused
  • Comcast — System-wide network shaping; Pumba targets individual container network namespaces
  • Toxiproxy — TCP proxy for simulating network failures; Pumba operates at the container and network level
  • Gremlin — Commercial chaos engineering platform; Pumba is free and open-source

FAQ

Q: Does Pumba work with Kubernetes? A: Pumba is designed for Docker. For Kubernetes chaos testing, consider Chaos Mesh or LitmusChaos. Pumba can still target containers on K8s nodes if run with Docker access.

Q: Can Pumba target specific containers? A: Yes. Use --name with regex patterns to target containers by name, or filter by Docker labels.

Q: Will Pumba affect my production environment? A: Pumba only affects containers on the host where it runs. Use --dry-run to verify targeting before executing chaos experiments.

Q: How does network emulation work? A: Pumba uses Linux tc netem inside the target container's network namespace to inject latency, packet loss, and bandwidth limits without affecting other containers.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产