user-redis.yaml 449 B

123456789101112131415161718192021222324
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: user-redis
  5. labels:
  6. name: user-redis
  7. spec:
  8. replicas: 1
  9. strategy:
  10. type: RollingUpdate
  11. selector:
  12. matchLabels:
  13. name: user-redis
  14. template:
  15. metadata:
  16. labels:
  17. name: user-redis
  18. spec:
  19. containers: #定义Redis容器,开放6379端口
  20. - name: user-redis
  21. image: redis:5.0
  22. ports:
  23. - containerPort: 6379
  24. imagePullPolicy: IfNotPresent