Kubernetes
If you run Kubernetes, install DocSpring Enterprise with our Helm chart. It works on Amazon EKS, Google GKE, Azure AKS
and self-managed clusters, on amd64 and arm64 nodes. The chart and its full guide are in the kubernetes folder of
DocSpring/docspring-enterprise.
What the chart creates
Section titled “What the chart creates”| What | Kubernetes objects |
|---|---|
web, worker and worker_gj | A Deployment each, with an optional HorizontalPodAutoscaler and a PodDisruptionBudget |
| The release command | A Helm hook Job that runs before every install and upgrade |
| The scheduled tasks | Three CronJobs: hourly, daily and weekly |
| Settings | A ConfigMap and a Secret (or your own Secret) |
| Traffic | A Service, and an optional Ingress or Gateway API HTTPRoute |
| Network | Optional NetworkPolicies |
It doesn’t run PostgreSQL, Redis or file storage. Use managed services, such as Amazon RDS and ElastiCache, Cloud SQL and Memorystore, or Azure Database for PostgreSQL and Azure Cache for Redis. Files must go to an S3 or Google Cloud Storage bucket: several pods read and write them, so a volume doesn’t work.
What you need
Section titled “What you need”- Kubernetes 1.27 or later, and Helm 3.8 or later.
- PostgreSQL, Redis and a bucket, as the Requirements page describes.
- Your license key and Docker Hub credentials, which we email you.
- A namespace where pods may add the
NET_ADMINcapability, which means theprivilegedPod Security level, or a network plugin that enforces NetworkPolicies (below).
The metadata firewall
Section titled “The metadata firewall”Each container adds NET_ADMIN, so it can block the cloud metadata address (169.254.169.254) and nothing in the app
can read the node’s cloud credentials (Container security). Kubernetes
allows NET_ADMIN only at the privileged Pod Security level, and some platforms don’t allow it at all: EKS on
Fargate, and GKE Autopilot without its allow-net-admin setting.
Where you can’t allow it, set metadataFirewall: false and networkPolicy.enabled: true in your values. The chart’s
NetworkPolicy then blocks the metadata address instead, and the namespace can use the baseline level.
AWS credentials for S3
Section titled “AWS credentials for S3”On EKS, give the chart’s ServiceAccount an IAM role with access to the bucket, through EKS Pod Identity or IRSA
(serviceAccount.annotations). Don’t rely on the node’s instance role: the containers can’t reach it. Set
DOCSPRING_AWS_UPLOADS_S3_REGION too, since they can’t look the region up either.
Install
Section titled “Install”-
Create the namespace:
kubectl create namespace docspringkubectl label namespace docspring pod-security.kubernetes.io/enforce=privileged -
Write a values file. Start from
values.example.yamlin the chart, which is an EKS install, and give it at leastdomain, your license, the database and Redis URLs, two keys you generate once (openssl rand -hex 64forsecrets.secretKeyBase,openssl rand -hex 32forsecrets.submissionDataEncryptionKey), and the first admin’s email address and password. Keep a copy of the encryption key outside the cluster. To keep secrets out of the values file, create your own Secret and setsecrets.existingSecret. -
Install the chart:
helm install docspring-enterprise oci://ghcr.io/docspring/charts/docspring-enterprise \--version 1.0.0 --namespace docspring --values values.yaml --timeout 30mHelm runs the release Job first, which creates the database schema and the admin user, then the Deployments and CronJobs.
-
Check it, then point your DNS name at your ingress or load balancer and sign in:
kubectl exec -n docspring deploy/docspring-enterprise-web -- \run_as_deploy rake checks:health_check checks:generate_test_submission
Ingress and load balancers
Section titled “Ingress and load balancers”Whatever routes traffic to the web Service must allow request bodies up to 110 MB and wait at least 240 seconds for
a response. With ingress-nginx, for example:
ingress: enabled: true className: nginx annotations: nginx.ingress.kubernetes.io/proxy-body-size: "110m" nginx.ingress.kubernetes.io/proxy-read-timeout: "240" nginx.ingress.kubernetes.io/proxy-send-timeout: "240" nginx.ingress.kubernetes.io/proxy-buffer-size: "32k"The chart’s README has the settings for the AWS Load Balancer Controller, GKE, Azure Application Gateway, Traefik and the Gateway API.
Upgrade
Section titled “Upgrade”Set image.tag in your values to the new version, read its release notes,
and run helm upgrade with the same arguments as the install. The release Job runs the migrations first; if it
fails, the upgrade stops and the old release keeps running. Then the pods roll over one at a time, with no downtime.
Always pin image.tag. Without it, the chart runs the version it was released with, so upgrading the chart would also
upgrade DocSpring.
To go back to the release you had before, use helm rollback.