2b71b35d37afd968bffec0524b439d1a7bb01744.svn-base 719 B

123456789101112131415161718192021222324252627282930
  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: user-service
  5. labels:
  6. name: user-service
  7. spec:
  8. containers: #定义User容器,开放10086端口
  9. - name: user
  10. image: user
  11. ports:
  12. - containerPort: 10086
  13. imagePullPolicy: IfNotPresent
  14. - name: mysql #定义MySQL容器,开放3306端口
  15. image: mysql-for-user
  16. ports:
  17. - containerPort: 3306
  18. env:
  19. - name: MYSQL_ROOT_PASSWORD
  20. value: "123456"
  21. imagePullPolicy: IfNotPresent
  22. - name: redis #定义Redis容器,开放6379端口
  23. image: redis:5.0
  24. ports:
  25. - containerPort: 6379
  26. imagePullPolicy: IfNotPresent