作者 Administrator

增加新文件

  1 +apiVersion: v1
  2 +kind: Service
  3 +metadata:
  4 + name: sumifcc-bchart
  5 + namespace: mmm-suplus-prd
  6 + labels:
  7 + k8s-app: sumifcc-bchart
  8 +spec:
  9 + ports:
  10 + - name: "http"
  11 + port: 80
  12 + targetPort: 8080
  13 + selector:
  14 + k8s-app: sumifcc-bchart
  15 +---
  16 +apiVersion: extensions/v1beta1
  17 +kind: Deployment
  18 +metadata:
  19 + name: sumifcc-bchart
  20 + namespace: mmm-suplus-prd
  21 + labels:
  22 + k8s-app: sumifcc-bchart
  23 +spec:
  24 + replicas: 1
  25 + template:
  26 + metadata:
  27 + labels:
  28 + k8s-app: sumifcc-bchart
  29 + spec:
  30 + affinity:
  31 + nodeAffinity:
  32 + preferredDuringSchedulingIgnoredDuringExecution:
  33 + - preference: {}
  34 + weight: 100
  35 + requiredDuringSchedulingIgnoredDuringExecution:
  36 + nodeSelectorTerms:
  37 + - matchExpressions:
  38 + - key: kubernetes.io/hostname
  39 + operator: In
  40 + values:
  41 + - cn-hangzhou.i-bp1djh1xn7taumbue1zd
  42 + containers:
  43 + - name: sumifcc-bchart
  44 + image: 192.168.0.243:5000/mmm/sumifcc-bchart:master
  45 + imagePullPolicy: Always
  46 + ports:
  47 + - containerPort: 8080
  48 + volumeMounts:
  49 + - mountPath: /opt/logs
  50 + name: accesslogs
  51 + env:
  52 + - name: LOG_LEVEL
  53 + value: "debug"
  54 + - name: ERROR_BASE_CODE
  55 + value: "1"
  56 + - name: ERROR_BASE_CODE_MULTIPLE
  57 + value: "1000"
  58 + volumes:
  59 + - name: accesslogs
  60 + emptyDir: {}