golang-im聊天
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

business.yaml 1.1 KiB

2 yıl önce
2 yıl önce
2 yıl önce
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # deployment 配置
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: business-deployment
  6. namespace: gim
  7. labels:
  8. app: business
  9. spec:
  10. replicas: 1
  11. selector:
  12. matchLabels:
  13. app: business
  14. template:
  15. metadata:
  16. labels:
  17. app: business
  18. spec:
  19. containers:
  20. - name: business
  21. image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos-gim-business:20221128-01'
  22. imagePullPolicy: Always
  23. ports:
  24. - containerPort: 8000
  25. volumeMounts: # 映射文件为宿主机文件
  26. - mountPath: /log/
  27. name: log
  28. env:
  29. - name: POD_IP
  30. valueFrom:
  31. fieldRef:
  32. fieldPath: status.podIP
  33. volumes:
  34. - name: log
  35. hostPath:
  36. path: /log/
  37. ---
  38. # service 配置
  39. apiVersion: v1
  40. kind: Service
  41. metadata:
  42. name: business
  43. namespace: gim
  44. labels:
  45. app: business # 只有设置label,才能被服务发现找到
  46. spec:
  47. selector:
  48. app: business
  49. ports:
  50. - protocol: TCP
  51. port: 8000
  52. targetPort: 8000