apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: redis
    role: single
    tier: db
  name: redis
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis
      role: single
      tier: db
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: redis
        role: single
        tier: db
    spec:
      containers:
      - args:
        - redis-server
        image: redis:3.2.4-alpine
        imagePullPolicy: "IfNotPresent"
        name: redis
        ports:
        - containerPort: 6379
        resources: {}
        volumeMounts:
        - mountPath: /var/lib/redis
          name: redis-data
      restartPolicy: Always
      serviceAccountName: ""
      volumes:
      - name: redis-data
        persistentVolumeClaim:
          claimName: redis-data
status: {}
