apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-dpl
spec:
  replicas: 1
  selector:
    matchLabels:
      name: redis
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        name: redis
    spec:
      containers:
      - image: redis
        imagePullPolicy: IfNotPresent
        name: redis
        ports:
        - containerPort: 6379
        volumeMounts:
        - mountPath: /data
          name: redis
      restartPolicy: Always
      volumes:
      - name: redis
        persistentVolumeClaim:
          claimName: redis
