You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

on-kubernetes.zh-tw.md 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ---
  2. date: "2020-03-19T19:27:00+02:00"
  3. title: "在 Kubernetes 安裝"
  4. slug: "install-on-kubernetes"
  5. sidebar_position: 80
  6. toc: false
  7. draft: false
  8. aliases:
  9. - /zh-tw/install-on-kubernetes
  10. menu:
  11. sidebar:
  12. parent: "installation"
  13. name: "Kubernetes"
  14. sidebar_position: 80
  15. identifier: "install-on-kubernetes"
  16. ---
  17. # 使用 Helm 安裝 (在 Kubernetes)
  18. Gitea 提供 Helm Chart 用來安裝於 kubernetes。
  19. 非自訂安裝可使用下列指令:
  20. ```
  21. helm repo add gitea-charts https://dl.gitea.com/charts/
  22. helm install gitea gitea-charts/gitea
  23. ```
  24. 若您想自訂安裝(包括使用 kubernetes ingress),請前往完整的 [Gitea helm chart configuration details](https://gitea.com/gitea/helm-chart/)
  25. ## 運行狀況檢查終端節點
  26. Gitea 附帶了一個運行狀況檢查端點 `/api/healthz`,你可以像這樣在 kubernetes 中配置它:
  27. ```yaml
  28. livenessProbe:
  29. httpGet:
  30. path: /api/healthz
  31. port: http
  32. initialDelaySeconds: 200
  33. timeoutSeconds: 5
  34. periodSeconds: 10
  35. successThreshold: 1
  36. failureThreshold: 10
  37. ```
  38. 成功的運行狀況檢查回應將使用 HTTP 代碼 `200` 進行回應,下面是示例:
  39. ```
  40. HTTP/1.1 200 OK
  41. {
  42. "status": "pass",
  43. "description": "Gitea: Git with a cup of tea",
  44. "checks": {
  45. "cache:ping": [
  46. {
  47. "status": "pass",
  48. "time": "2022-02-19T09:16:08Z"
  49. }
  50. ],
  51. "database:ping": [
  52. {
  53. "status": "pass",
  54. "time": "2022-02-19T09:16:08Z"
  55. }
  56. ]
  57. }
  58. }
  59. ```
  60. 有關更多信息,請參考kubernetes文檔[定義一個存活態 HTTP請求接口](https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)