redis-deployment.yaml 492 B

12345678910111213141516171819202122232425262728
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. labels:
  5. app: redis
  6. name: redis
  7. spec:
  8. replicas: 1
  9. selector:
  10. matchLabels:
  11. app: redis
  12. template:
  13. metadata:
  14. labels:
  15. app: redis
  16. spec:
  17. containers:
  18. - image: redis:alpine
  19. name: redis
  20. ports:
  21. - containerPort: 6379
  22. name: redis
  23. volumeMounts:
  24. - mountPath: /data
  25. name: redis-data
  26. volumes:
  27. - name: redis-data
  28. emptyDir: {}