apiVersion: apps/v1 kind: Deployment metadata: name: redis namespace: default labels: app: redis spec: replicas: 1 selector: matchLabels: app: redis template: metadata: labels: app: redis spec: containers: - name: redis image: registry.t-aaron.com/redis:7.2-alpine ports: - containerPort: 6379 name: redis command: - redis-server - /etc/redis/redis.conf env: - name: REDIS_PASSWORD value: "redis123" resources: requests: memory: "256Mi" cpu: "100m" limits: memory: "512Mi" cpu: "200m" livenessProbe: exec: command: - redis-cli - -a - redis123 - ping initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: exec: command: - redis-cli - -a - redis123 - ping initialDelaySeconds: 5 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3 volumeMounts: - name: redis-config mountPath: /etc/redis - name: redis-data mountPath: /data volumes: - name: redis-config configMap: name: redis-config - name: redis-data emptyDir: {} restartPolicy: Always