附近小店
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

container_agent_prd.yaml 1.7 KiB

1 månad sedan
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. labels:
  5. app: community-team-agent
  6. annotations:
  7. kubesphere.io/creator: dengbiao
  8. kubesphere.io/description: community-team-agent
  9. name: community-team-agent
  10. namespace: zhios
  11. spec:
  12. replicas: 1
  13. selector:
  14. matchLabels:
  15. app: community-team-agent
  16. template:
  17. metadata:
  18. labels:
  19. app: community-team-agent
  20. spec:
  21. volumes:
  22. # 用于时区校正
  23. - name: host-time
  24. hostPath:
  25. path: /etc/localtime
  26. type: ''
  27. # pvc
  28. - name: community-team-agent-pvc # 在该部署中的名称,后面使用改名称挂载
  29. persistentVolumeClaim:
  30. claimName: community-team-agent-pvc # pvc的名称
  31. # Nginx配置
  32. - name: community-team-agent-nginx
  33. configMap:
  34. name: community-team-agent-nginx # 外部configMap的名称
  35. items:
  36. - key: nginx.conf
  37. path: default.conf
  38. containers:
  39. - image: nginx
  40. imagePullPolicy: IfNotPresent
  41. name: community-team-agent
  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-agent-nginx
  52. mountPath: /etc/nginx/conf.d/default.conf
  53. readOnly: true
  54. subPath: default.conf
  55. - name: community-team-agent-pvc
  56. mountPath: /usr/share/nginx/html
  57. dnsPolicy: ClusterFirst
  58. restartPolicy: Always