apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: cache
  name: cache
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: cache
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        io.kompose.service: cache
    spec:
      containers:
        - image: redis:alpine
          name: cache
          resources: 
            requests:
              memory: "50Mi"
              cpu: "50m"
            limits:
              memory: "60Mi"
              cpu: "100m"
          volumeMounts:
            - mountPath: /data
              name: redis-data
      restartPolicy: Always
      volumes:
        - name: redis-data
          persistentVolumeClaim:
            claimName: redis-data