apiVersion: v1
kind: Pod
metadata:
  name: myapp-random-number-generator
  labels:
    name: volume-examples
spec:
  containers:
  - name: myapp-random-number-generator-container
    image: alpine:3.7
    resources:
      limits:
        memory: "128Mi"
        cpu: "500m"
    command: ["/bin/sh", "-c"]
    args: ["shuf -i 0-100 -n 1 >> /opt/number.out;"]
    volumeMounts:
     - mountPath: /opt
       name: data-volume
  volumes:
  - name: data-volume
    hostPath:
      path: /data
      type: Directory