apiVersion: apps/v1
kind: Deployment
metadata:
  name: busybox
  labels:
    appname: busybox
spec:
  selector:
    matchLabels:
      appname: busybox
  replicas: 1
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        appname: busybox
    spec:
      dnsPolicy: ClusterFirst
      volumes:
        - name: mypvc
          persistentVolumeClaim:
            claimName: busybox-pvc
      containers:
        - name: busybox
          image: 'quay.io/vcppds7878/busybox:latest'
          imagePullPolicy: IfNotPresent
          command: ['sh', '-c', 'while true; do echo $(date) | tee -a /mnt/test/outfile; sync; sleep 1; done']
          volumeMounts:
            - name: mypvc
              mountPath: /mnt/test
              subPath: ''

