Kubernetes Deployment
Mezite ships a Helm chart for deploying to Kubernetes. The chart is
located at deploy/helm/mezite/ in the repository.
Prerequisites
- Kubernetes 1.27+
- Helm 3.12+
- A PostgreSQL 16 instance (managed or self-hosted)
Installation
Install with Helm bash
# Add and install from the local chart
helm install mezite ./deploy/helm/mezite/ \
--namespace mezite \
--create-namespace \
--set postgres.uri="postgres://mezite:secret@postgres:5432/mezite?sslmode=require" values.yaml
Key configuration options in values.yaml:
values.yaml (key fields) yaml
replicaCount: 2
image:
repository: ghcr.io/mezite/mezite
tag: latest
pullPolicy: IfNotPresent
postgres:
uri: "" # Required: PostgreSQL connection string
service:
type: LoadBalancer
ports:
auth: 3025
proxy: 3080
ssh: 3023
tunnel: 3024
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
cpu: "1"
memory: 512Mi
persistence:
enabled: true
size: 1Gi PostgreSQL Setup
You can either use a managed PostgreSQL service or deploy one alongside
Mezite. The Helm chart does not include PostgreSQL by default; provide a
connection URI via postgres.uri.
Example: deploy PostgreSQL with Helm bash
helm install pg bitnami/postgresql \
--namespace mezite \
--set auth.username=mezite \
--set auth.password=secret \
--set auth.database=mezite Configuration
Override any value at install time or with a custom values file:
Custom values file bash
helm install mezite ./deploy/helm/mezite/ \
--namespace mezite \
--create-namespace \
-f my-values.yaml Scaling
The mezhub auth and proxy services are stateless (all state lives
in PostgreSQL) and can be scaled horizontally:
Scale the deployment bash
kubectl scale deployment mezite --replicas=3 -n mezite Agents maintain persistent reverse tunnels to the proxy. When scaling the proxy, ensure your load balancer supports long-lived TCP connections on port 3024.