apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: nfs-demo
    role: busybox
  name: nfs-busybox
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nfs-demo
      role: busybox
  template:
    metadata:
      labels:
        app: nfs-demo
        role: busybox
    spec:
      containers:
      - image: busybox
        command:
        - sh
        - -c
        - "while true; do date > /mnt/index.html; hostname >> /mnt/index.html; sleep
          $(($RANDOM % 5 + 5)); done"
        imagePullPolicy: IfNotPresent
        name: busybox
        volumeMounts:
        - # name must match the volume name below
          name: rook-nfs-vol
          mountPath: "/mnt"
      volumes:
      - name: rook-nfs-vol
        persistentVolumeClaim:
          claimName: rook-nfs-pv-claim
