user.yaml 676 B

1234567891011121314151617181920212223242526272829303132333435
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: user-service
  5. labels:
  6. name: user-service
  7. spec:
  8. replicas: 1
  9. strategy:
  10. type: RollingUpdate
  11. selector:
  12. matchLabels:
  13. name: user-service
  14. template:
  15. metadata:
  16. labels:
  17. name: user-service
  18. spec:
  19. containers: #定义User容器,开放10086端口
  20. - name: user
  21. image: aoho/user:<COMMIT_ID_TAG>
  22. ports:
  23. - containerPort: 10086
  24. imagePullPolicy: IfNotPresent
  25. env:
  26. - name: mysqlAddr
  27. value: <MYSQL_ADDR_TAG>
  28. - name: redisAddr
  29. value: <REDIS_ADDR_TAG>