apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: chaoskube
  labels:
    app: chaoskube
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: chaoskube
    spec:
      serviceAccountName: chaoskube
      containers:
      - name: chaoskube
        image: quay.io/linki/chaoskube:v0.5.0
        args:
        # kill a pod every 10 minutes
        - --interval=10m
        # only target pods in the test environment
        - --labels=environment=test
        # only consider pods with this annotation
        - --annotations=chaos.alpha.kubernetes.io/enabled=true
        # exclude all pods in the kube-system namespace
        - --namespaces=!kube-system
        # terminate pods for real: this disables dry-run mode which is on by default
        - --no-dry-run

---

apiVersion: v1
kind: ServiceAccount
metadata:
  name: chaoskube

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: chaoskube
  labels:
    app: chaoskube
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: chaoskube
    spec:
      serviceAccountName: chaoskube
      containers:
      - name: chaoskube
        image: quay.io/linki/chaoskube:v0.5.0
        args:
        # use in-cluster configuration
        - --in-cluster
        # kill a pod every 10 minutes
        - --interval=10m
        # only target pods in the test environment
        - --labels=environment=test
        # only consider pods with this annotation
        - --annotations=chaos.alpha.kubernetes.io/enabled=true
        # exclude all pods in the kube-system namespace
        - --namespaces=!kube-system
        # terminate pods for real: this disables dry-run mode which is on by default
        - --no-dry-run

---

apiVersion: v1
kind: ServiceAccount
metadata:
  name: chaoskube

Use in-cluster config in example deployment
Use in-cluster config in example deployment

Otherwise, you'll get `level=fatal msg="stat /root/.kube/config: no such file or directory"`