Kubernetes
WorkSmartHub ships a Helm chart (worksmarthub) in the WorkSmartHub-Docker-Kubernetes repository. Its operator guide (English, Magyar) walks through twelve steps, from the namespace to the licence, plus upgrade, rollback, migration between environments and a production checklist. This page summarises it.
Prerequisites#
- A cluster (EKS, AKS, GKE, self-managed; minikube for testing),
kubectl, Helm 3. - The image where the nodes can pull it (built into minikube, loaded on the nodes, or pushed to your registry).
- A default StorageClass.
- The ingress-nginx controller for the chart's Ingress (or disable it and route yourself).
Quick start#
bash build/build-image.sh --version 23 --minikube
helm install worksmarthub ./kubernetes-helm-chart --set app.image.tag=23
kubectl get pods -n worksmarthub -w
kubectl port-forward -n worksmarthub svc/worksmarthub 8080:80With the defaults the chart deploys into the namespace worksmarthub:
| Component | What it is |
|---|---|
| Application | One pod with probes on /health, appsettings.json from a ConfigMap, the data volume at /app/data |
| Data volume | PVC worksmarthub-data-claim (5 Gi): file storage, logs, templates, SQLite if selected |
| PostgreSQL | Built-in postgres:16-alpine, selected as the internal database |
| Redis | Built-in redis:7-alpine, selected as the cache |
| Ingress | For ingress-nginx, with upload limits |
| NetworkPolicies | Only pods of the namespace may reach the database and Redis |
Change the built-in database password before anything but a throw-away test: it starts with a public default.
Production#
- Use an external database (recommended) or keep the built-in PostgreSQL with your own password.
- Set the signing keys and
PublicBaseUrl, preferably from Kubernetes Secrets. - Choose the Service type and Ingress (TLS) for your environment.
- For more than one replica: an external database, Redis or a database cache, and a cloud file storage. Migrations at start-up are locked across replicas, and scheduled jobs run once per occurrence.
- SQLite is possible with exactly one replica.
Licence#
The licence is uploaded in the application (Licenc) or with POST /api/licensing/set; it is stored in the database, so all replicas share it and it survives upgrades (Licence).
Operations#
helm upgrade worksmarthub ./kubernetes-helm-chart -f my-values.yaml --set app.image.tag=<new>
kubectl logs -n worksmarthub deploy/worksmarthub-deployment -c worksmarthub-container -fKeep your settings in your own values file and reuse it for upgrades. Back up the database before an upgrade; going back means restoring that backup, because migrations are never reversed. For air-gapped clusters, copy the images (postgres, redis, busybox) to your registry. Troubleshooting for Pending pods, image pull errors, database password errors and 413 upload errors is in the operator guide.