apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: redis
  name: redis
  namespace: dev
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: redis
    spec:
      volumes:
        - name: redis-claim0
          persistentVolumeClaim:
            claimName: redis-claim0
      restartPolicy: Always
      containers:
        - name: redis
          image: redis
          imagePullPolicy: Always
          ports:
            - containerPort: 6379
          startupProbe:
            initialDelaySeconds: 60
            periodSeconds: 30
            timeoutSeconds: 5
            successThreshold: 1
            failureThreshold: 10
            tcpSocket: 
              port: 6379
          readinessProbe:
            periodSeconds: 60
            timeoutSeconds: 5
            successThreshold: 1
            failureThreshold: 3
            tcpSocket: 
              port: 6379
          livenessProbe:
            periodSeconds: 60
            timeoutSeconds: 5
            successThreshold: 1
            failureThreshold: 3
            tcpSocket: 
              port: 6379
          volumeMounts:
            - name: redis-claim0
              mountPath: /data
