caipin 4 年之前
父节点
当前提交
1c70afa2b0
共有 1 个文件被更改,包括 37 次插入0 次删除
  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
+---