mysql-external-service.yaml 334 B

12345678910111213141516
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: mysql-external-service
  5. namespace: default
  6. spec:
  7. type: LoadBalancer
  8. selector:
  9. app: mysql
  10. role: master
  11. ports:
  12. - protocol: TCP
  13. port: 3306
  14. targetPort: 3306
  15. # 可选:如果你的云平台支持,可指定 loadBalancerIP
  16. # loadBalancerIP: "203.0.113.10"