--- apiVersion: apps/v1 kind: Deployment metadata: name: redis namespace: artifactapi spec: replicas: 1 selector: matchLabels: app: redis template: metadata: labels: app: redis spec: containers: - name: redis image: redis:7-alpine command: - redis-server - --save - "20" - "1" ports: - containerPort: 6379 name: redis protocol: TCP resources: limits: cpu: 500m memory: 512Mi requests: cpu: 50m memory: 128Mi 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 restartPolicy: Always