Installation with Helm (on Kubernetes)

Gitea provides a Helm Chart to allow for installation on kubernetes.

A non-customized install can be done with:

  1. helm repo add gitea-charts https://dl.gitea.io/charts/
  2. helm install gitea gitea-charts/gitea

If you would like to customize your install, which includes kubernetes ingress, please refer to the complete Gitea helm chart configuration details

Health check endpoint

Gitea comes with a health check endpoint /api/healthz, you can configure it in kubernetes like this:

  1. livenessProbe:
  2. httpGet:
  3. path: /api/healthz
  4. port: http
  5. initialDelaySeconds: 200
  6. timeoutSeconds: 5
  7. periodSeconds: 10
  8. successThreshold: 1
  9. failureThreshold: 10

a successful health check response will respond with http code 200, here’s example:

  1. HTTP/1.1 200 OK
  2. {
  3. "status": "pass",
  4. "description": "Gitea: Git with a cup of tea",
  5. "checks": {
  6. "cache:ping": [
  7. {
  8. "status": "pass",
  9. "time": "2022-02-19T09:16:08Z"
  10. }
  11. ],
  12. "database:ping": [
  13. {
  14. "status": "pass",
  15. "time": "2022-02-19T09:16:08Z"
  16. }
  17. ]
  18. }
  19. }

for more information, please reference to kubernetes documentation Define a liveness HTTP request