apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-dpl
  labels:
    app: redis-db
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis-db
  template:
    metadata:
      labels:
        app: redis-db
    spec:
      containers:
        - image: docker.io/redis
          name: redis
          ports:
            - containerPort: 6379
          volumeMounts:
            - name: redis-storage
              mountPath: /mnt/data
      volumes:
        - name: redis-storage
          persistentVolumeClaim:
            claimName: redis-pv-claim

