作者 Administrator

增加新文件

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