Skip to content

Instantly share code, notes, and snippets.

@lordofthejars
Last active October 25, 2017 09:18
Show Gist options
  • Save lordofthejars/3a342bc8ac7e253ccec35b7ff69f56a1 to your computer and use it in GitHub Desktop.
Save lordofthejars/3a342bc8ac7e253ccec35b7ff69f56a1 to your computer and use it in GitHub Desktop.
# If you are running Kubernetes >= 1.1.0. You can take advantage of DaemonSets to automatically deploy the Pumba on all your nodes.
# On 1.1.x you'll need to explicitly enable the DaemonSets extension, see http://kubernetes.io/v1.1/docs/admin/daemons.html#caveats.
# You'll then be able to deploy the DaemonSet with the command
# `kubectl create -f pumba_kube.yaml`
# If you are not running Kubernetes >= 1.1.0 or do not want to use DaemonSets, you can also run the Pumba as a regular docker container on each node you want to make chaos.
# `docker run -d -v /var/run/docker.sock:/var/run/docker.sock gaiaadm/pumba pumba --random --interval 3m kill --signal SIGKILL"`
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: pumba
spec:
template:
metadata:
labels:
app: pumba
name: pumba
spec:
containers:
- image: gaiaadm/pumba:master
imagePullPolicy: Always
name: pumba
command: ["pumba"]
args: ["--random", "--debug", "--interval", "30s", "kill", "--signal", "SIGKILL", "re2:.*hello.*"]
securityContext:
runAsUser: 0
volumeMounts:
- name: dockersocket
mountPath: /var/run/docker.sock
volumes:
- hostPath:
path: /var/run/docker.sock
name: dockersocket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment