apiVersion: apps/v1 kind: Deployment metadata: labels: app: redis name: redis spec: replicas: 1 selector: matchLabels: app: redis template: metadata: labels: app: redis spec: containers: - command: - redis-server - /redis-master/redis.conf image: redis:alpine name: redis ports: - containerPort: 6379 volumeMounts: - mountPath: /redis-master-data name: data - mountPath: /redis-master name: config restartPolicy: Always volumes: - name: data emptyDir: {} - name: config configMap: name: cm-redis-config items: - key: redis-config path: redis.conf