mirror of
https://gitea.com/gitea/docs.git
synced 2025-05-07 22:01:09 +00:00
Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: https://gitea.com/gitea/docs/pulls/195 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
1.4 KiB
1.4 KiB
date, slug, sidebar_position, aliases
date | slug | sidebar_position | aliases | |
---|---|---|---|---|
2020-03-19T19:27:00+02:00 | install-on-kubernetes | 80 |
|
在 Kubernetes 上安裝
Gitea 提供了一個 Helm Chart 以允許在 kubernetes 上安裝。
可以使用以下命令進行非自定義安裝:
helm repo add gitea-charts https://dl.gitea.com/charts/
helm install gitea gitea-charts/gitea
如果您想自定義安裝,包括 kubernetes ingress,請參閱完整的 Gitea helm chart 配置詳細信息
健康檢查端點
Gitea 帶有一個健康檢查端點 /api/healthz
,您可以在 kubernetes 中這樣配置它:
livenessProbe:
httpGet:
path: /api/healthz
port: http
initialDelaySeconds: 200
timeoutSeconds: 5
periodSeconds: 10
successThreshold: 1
failureThreshold: 10
成功的健康檢查響應將返回 http 代碼 200
,示例如下:
HTTP/1.1 200 OK
{
"status": "pass",
"description": "Gitea: Git with a cup of tea",
"checks": {
"cache:ping": [
{
"status": "pass",
"time": "2022-02-19T09:16:08Z"
}
],
"database:ping": [
{
"status": "pass",
"time": "2022-02-19T09:16:08Z"
}
]
}
}
有關更多信息,請參考 kubernetes 文檔 定義 liveness HTTP 請求