附近小店
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

container_merchant_prd.yaml 1.7 KiB

1ヶ月前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. labels:
  5. app: community-team-merchant
  6. annotations:
  7. kubesphere.io/creator: dengbiao
  8. kubesphere.io/description: community-team-merchant
  9. name: community-team-merchant
  10. namespace: zhios
  11. spec:
  12. replicas: 1
  13. selector:
  14. matchLabels:
  15. app: community-team-merchant
  16. template:
  17. metadata:
  18. labels:
  19. app: community-team-merchant
  20. spec:
  21. volumes:
  22. # 用于时区校正
  23. - name: host-time
  24. hostPath:
  25. path: /etc/localtime
  26. type: ''
  27. # pvc
  28. - name: community-team-merchant-pvc # 在该部署中的名称,后面使用改名称挂载
  29. persistentVolumeClaim:
  30. claimName: community-team-merchant-pvc # pvc的名称
  31. # Nginx配置
  32. - name: community-team-merchant-nginx
  33. configMap:
  34. name: community-team-merchant-nginx # 外部configMap的名称
  35. items:
  36. - key: nginx.conf
  37. path: default.conf
  38. containers:
  39. - image: nginx
  40. imagePullPolicy: IfNotPresent
  41. name: community-team-merchant
  42. ports:
  43. - containerPort: 80
  44. name: tcp-80
  45. protocol: TCP
  46. resources: {}
  47. volumeMounts:
  48. - name: host-time
  49. mountPath: /etc/localtime
  50. readOnly: true
  51. - name: community-team-merchant-nginx
  52. mountPath: /etc/nginx/conf.d/default.conf
  53. readOnly: true
  54. subPath: default.conf
  55. - name: community-team-merchant-pvc
  56. mountPath: /usr/share/nginx/html
  57. dnsPolicy: ClusterFirst
  58. restartPolicy: Always