apiVersion: v1
kind: Service
metadata:
  labels:
    app: mysql-min
    release: mysql-min
  name: mysql-min
  namespace: default
spec:
  ports:
  - name: mysql
    port: 3306
    protocol: TCP
    nodePort: 30336
    targetPort: mysql
  selector:
    app: mysql-min
  #目前sessionAffinity可以提供"None"與"ClientIP"两种设定:
  #None: 以round robin的方式轮询下面的Pods。
  #ClientIP: 以client ip的方式固定request到同一台机器。
  sessionAffinity: None
  type: NodePort
#status:
#  loadBalancer: {}
