Skip to main content

network-bandwidth

Limits available bandwidth using Linux tc tbf (token bucket filter).

Target kind: Pod
Implementation: Daemon (ExecNetworkChaos with action: bandwidth)
Rollback: Yes — removes tc tbf rules

Parameters

NameTypeRequiredDefaultDescription
ratestringYesBandwidth limit (e.g. "1mbit", "500kbit")
burststringYesBurst size (e.g. "10kb", "1mb")
latencystringYesMaximum latency before packets are dropped

Example

apiVersion: chaos.chaosplane.io/v1alpha1
kind: ChaosExperiment
metadata:
name: network-bandwidth-example
namespace: default
spec:
target:
kind: Pod
namespace: default
labelSelector:
matchLabels:
app: video-encoder
action:
type: network-bandwidth
parameters:
rate: "1mbit"
burst: "10kb"
latency: "100ms"
duration: 60s
rollback:
enabled: true

Rollback behavior

Removes the tc tbf qdisc from the pod's network interface.

Implementation notes

Uses tc qdisc add dev eth0 root tbf rate RATE burst BURST latency LATENCY. All three parameters are required. rate uses tc notation (kbit, mbit, gbit). burst is the maximum amount of data that can be sent at once. latency is the maximum time a packet can sit in the queue before being dropped.