apiVersion: apps/v1
kind: Deployment
metadata:
  name: "redis"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis
      name: redis
  template:
    metadata:
      labels:
        app: redis
        name: "redis"
    spec:
      containers:
        - name: redis
          image: "k8s.gcr.io/redis"
          command:
            - "redis-server"
          args:
            - "--appendonly"
            - "yes"
          resources:
            requests:
              cpu: "100m"
              memory: "100Mi"
          ports:
            - name: redis
              containerPort: 6379
              protocol: "TCP"
            - name: cluster
              containerPort: 16379
              protocol: "TCP"
          volumeMounts:
            - name: "redis-conf"
              mountPath: "/etc/redis"
            - name: "redis-data"
              mountPath: "/data"
      volumes:
        - name: "redis-data"
          persistentVolumeClaim:
             claimName: px-redis-data
        - name: "redis-conf"
          persistentVolumeClaim:
             claimName: px-redis-conf
