BuildScript文件夹下k8s yaml文件配置

前端项目,在部署发布的时候需要配置yaml文件: image.png BuildScript文件夹下需要这三个.yaml文件 配置如下: image.png image.png 就这样,三个文件内容基本一样,需根据实际情况修改namespace及host 源码在这里 apiVersion: extentions/v1beta1 kind: Deployment metadata: name: web-master namespace: It23-05-foreign-assistant spec: replicas: 1 selector: matchLabels: run: web-master strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: lablels: run: web-master service.alauda.io/name: self.resource_name annotations: owner.cm.io/info: '[{"name": "Jeff", "phone":"11111111111"}]' spec: containers: - image: [image] imagePillPolicy: Always name: web-master env: - name: ENV_FOR_DYNACONF value: passweb ports: - containerPort: 8080 resources: limits: cpu: ‘2’ memory: 2G requests: cpu: ‘2’ memory: 2G --- kind: Service apiVersion: v1 metadata: name: web-master namespace: It23-05-foreign-assistant spec: template: metadata: lablels: run: web-master service.alauda.io/name: self.resource_name ports: - port: 8080 name: 8080-8080 protocol: TCP targetPort: 8080 selector: run: web-master --- apiVersion: route.openshift.io/v1 kind: Route metadata: annotations: haproxy.router.openshift.io.timeout: 900s name: web-master namespace: It23-05-foreign-assistant spec: host: web-master.xxx.xxxx.xx to: kind: Service name: web-master port: targetPort: 8080-8080

本文章由javascript技术分享原创和收集

发表评论 (审核通过后显示评论):