caipin 4 years ago
parent
commit
1c70afa2b0
1 changed files with 37 additions and 0 deletions
  1. 37 0
      deployment/cm.yaml

+ 37 - 0
deployment/cm.yaml

@@ -0,0 +1,37 @@
+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: apigw
+spec:
+  type: NodePort
+  selector:
+      app: apigw
+  ports:
+  - protocol: TCP
+    name: apigw
+    nodePort: 6060
+    port: 6060
+    targetPort: 6060
+---