--- apiVersion: apps/v1 kind: Deployment metadata: name: redis-v3-deployment namespace: artifactapi spec: replicas: 1 selector: matchLabels: app: redis-v3 strategy: type: Recreate template: spec: containers: - name: redis image: redis:7-alpine imagePullPolicy: IfNotPresent command: - redis-server - --save - "20" - "1" ports: - containerPort: 6379 name: redis protocol: TCP livenessProbe: exec: command: - redis-cli - ping failureThreshold: 3 initialDelaySeconds: 30 periodSeconds: 30 successThreshold: 1 timeoutSeconds: 5 readinessProbe: exec: command: - redis-cli - ping failureThreshold: 3 initialDelaySeconds: 5 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 5 resources: limits: cpu: 500m memory: 512Mi requests: cpu: 50m memory: 128Mi volumeMounts: - mountPath: /data mountPropagation: None name: data restartPolicy: Always volumes: - name: data persistentVolumeClaim: claimName: artifactapi-v3-redis-data