Skip to content

Instantly share code, notes, and snippets.

@bprashanth
Created April 4, 2016 22:09
Show Gist options
  • Save bprashanth/49dceba38bedaa5dcf615581fdb5a1cc to your computer and use it in GitHub Desktop.
Save bprashanth/49dceba38bedaa5dcf615581fdb5a1cc to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ReplicationController
metadata:
  name: gce-busybox
spec:
  replicas: 1
  selector:
    name: gce-busybox
  template:
    metadata:
      labels:
        name: gce-busybox
    spec:
      containers:
      - image: busybox
        command:
          - sh
          - -c
          - 'while true; do date > /mnt/index.html; hostname >> /mnt/index.html; tail -5 /mnt/index.html; echo sleeping; sleep $(($RANDOM % 5 + 5)); done'
        imagePullPolicy: IfNotPresent
        name: busybox
        volumeMounts:
          # name must match the volume name below
          - name: pv
            mountPath: "/mnt"
      volumes:
      - name: pv
        gcePersistentDisk:
          pdName: foo
          fsType: ext4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment