附近小店
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

58 linhas
1.7 KiB

  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