apiVersion: extensions/v1beta1
kind: Deployment
metadata:
    name: cm
spec:
    replicas: 1
    template:
      metadata:
        labels:
          app: cm  #给pod加上labels
      spec:
        containers:
        - name: apigw
          image: registry.cn-shenzhen.aliyuncs.com/construction_management/construction_management:latest
          ports:
          - containerPort: 6060
          imagePullPolicy: Always
        imagePullSecrets:
        - name: regsecret

# 定义service
---
apiVersion: v1
kind: Service
metadata:
  name: cm
spec:
  type: NodePort
  selector:
      app: cm
  ports:
  - protocol: TCP
    name: cm
    nodePort: 30008
    port: 6060
    targetPort: 6060
---