service-mysql-for-apollo-dev-env.yaml 522 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. # 为外部 mysql 服务设置 service
  3. kind: Service
  4. apiVersion: v1
  5. metadata:
  6. namespace: sre
  7. name: service-mysql-for-apollo-dev-env
  8. labels:
  9. app: service-mysql-for-apollo-dev-env
  10. spec:
  11. ports:
  12. - protocol: TCP
  13. port: 3306
  14. targetPort: 3306
  15. type: ClusterIP
  16. sessionAffinity: None
  17. ---
  18. kind: Endpoints
  19. apiVersion: v1
  20. metadata:
  21. namespace: sre
  22. name: service-mysql-for-apollo-dev-env
  23. subsets:
  24. - addresses:
  25. - ip: your-mysql-addresses
  26. ports:
  27. - protocol: TCP
  28. port: 3306