0
0
mirror of https://gitea.com/gitea/docs.git synced 2025-06-15 08:13:27 +00:00
Files
.gitea
docs
i18n
en-us
zh-cn
zh-tw
docusaurus-plugin-content-docs
current
administration
contributing
development
help
installation
comparison.md
database-preparation.md
from-binary.md
from-package.md
from-source.md
on-cloud-provider.md
on-kubernetes.md
run-as-service-in-ubuntu.md
upgrade-from-gitea.md
windows-service.md
with-docker-rootless.md
with-docker.md
usage
administration.md
development.md
help.md
index.md
installation.md
usage.md
version-1.19
version-1.20
version-1.21
version-1.22
version-1.23
version-1.24
current.json
version-1.19.json
version-1.20.json
version-1.21.json
version-1.22.json
version-1.23.json
version-1.24.json
docusaurus-theme-classic
code.json
runner
runner_versioned_docs
src
static
versioned_docs
versioned_sidebars
.editorconfig
.gitattributes
.gitignore
.npmrc
LICENSE
Makefile
README.md
babel.config.js
check_outdated.sh
docusaurus.config.js
package-lock.json
package.json
renovate.json5
runner_versions.json
sidebars.js
versions.json
appleboy dbfa0ba454 docs: add zh-tw folder (#195)
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>
2025-04-04 23:28:16 +00:00

1.9 KiB
Raw Permalink Blame History

date, slug, sidebar_position, aliases
date slug sidebar_position aliases
2020-03-19T19:27:00+02:00 install-on-kubernetes 80
/zh-tw/install-on-kubernetes

在 Kubernetes 中安装 Gitea

Gitea 已经提供了便于在 Kubernetes 云原生环境中安装所需的 Helm Chart

默认安装指令为:

helm repo add gitea https://dl.gitea.com/charts
helm repo update
helm install gitea gitea/gitea

如果采用默认安装指令Helm 会部署单实例的 Gitea, PostgreSQL, Memcached。若您想实现自定义安装包括配置 Gitea 集群、NGINX Ingress、MySQL、MariaDB、持久存储等请前往阅读Gitea Helm Chart

您也可以通过 helm show 命令导出 README.md 和配置文件 values.yaml 进行学习和编辑,例如:

helm show values gitea/gitea > values.yaml
helm show readme gitea/gitea > README.md

# 使用自定义的配置文件 values.yaml
helm install gitea -f values.yaml gitea/gitea

运行状况检查接口

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 文档 配置存活、就绪和启动探测器