bdca572b66ddfb43ce3e9f7680ae5e538d930fa1.svn-base 525 B

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