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