导航

表单 yaml

Posted on 2021-10-08 17:06  杨彬Allen  阅读(50)  评论(0编辑  收藏  举报
apiVersion: apps/v1
kind: Deployment
metadata:
  name: matrixform-deployment
  namespace: default
spec:
  selector:
    matchLabels:
      app: matrixform
  replicas: # tells deployment to run N pods matching the template
  template:
    metadata:
      labels:
        app: matrixform
    spec:
      containers:
      - name: serviceform
        image: 172.20.246.14:8858/matrix/medusa.service.form:v4.1.0.4
        ports:
        - containerPort: 31007
        volumeMounts:
          - mountPath: /app/appsettings.json
            name: matrix-medusa-service-form-appsettings
            readOnly: true
            subPath: appsettings.json
 
      volumes:
      - name: matrix-medusa-service-form-appsettings
        configMap:
          defaultMode: 420
          name: matrix-medusa-service-form-appsettings
---
apiVersion: v1
kind: Service
metadata:
  name: matrixform-service
  labels:
    name: matrixform-service
spec:
  type: NodePort
  ports:
  - port: 31007
    name: serviceform
    targetPort: 84
    protocol: TCP
    nodePort: 31007
  selector:
    app: matrixform