apiVersion: v1
kind: Service
metadata:
  name: mysql-svc
  namespace: goms-ek8s
  labels:
    svc: mysql-svc
spec:
  type: NodePort
  ports:
  - port: 3306
    protocol: TCP
    targetPort: 3306
    nodePort: 32021
  selector:
    app: mysql #选择 pod label