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