apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-deployment
  namespace: instabug
  labels:
   tier: backend

spec:
  replicas: 1

  selector:
    matchLabels:
      app: redis

  template:
    metadata:
      name: redis-pod
      namespace: instabug
      labels:
        app: redis
    spec:
      containers:
        - name: redis
          image: redis:5.0.7
          volumeMounts:
            - mountPath: "/var/lib/redis/data"
              name: redis-volume
          ports:
            - containerPort: 6379
          resources:
            requests:
              memory: "128Mi"
              cpu: "250m"
            limits:
              memory: "256Mi"
              cpu: "500"
      volumes:
        - name: redis-volume
          persistentVolumeClaim:
            claimName: redis-pvc


