apiVersion: apps/v1
kind: Deployment
metadata:
  name: jxsea
  labels:
    run: jxsea
spec:
  replicas: 1
  selector:
    matchLabels:
      run: jxsea
  template:
    metadata:
      labels:
        run: jxsea ## 与之后创建 service 对应
    spec:
      containers:
      - name: jxsea
        image: 10.10.10.11:5000/jxsea-mysql-36:1.0
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: jxsea
spec:
  type: ClusterIP
  selector:
    run: jxsea   ## 对应 Deployment 的 run
  ports:
  - protocol: TCP
    port: 80 # 负载均衡器对外的服务端口
    targetPort: 80 # 访问集群的端口
