Skip to content
Start free

Kubernetes

Open in ClaudeOpen in ChatGPT

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.

WhatKubernetes objects
web, worker and worker_gjA Deployment each, with an optional HorizontalPodAutoscaler and a PodDisruptionBudget
The release commandA Helm hook Job that runs before every install and upgrade
The scheduled tasksThree CronJobs: hourly, daily and weekly
SettingsA ConfigMap and a Secret (or your own Secret)
TrafficA Service, and an optional Ingress or Gateway API HTTPRoute
NetworkOptional 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.

  • 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_ADMIN capability, which means the privileged Pod Security level, or a network plugin that enforces NetworkPolicies (below).

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.

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.

  1. Create the namespace:

    kubectl create namespace docspring
    kubectl label namespace docspring pod-security.kubernetes.io/enforce=privileged
  2. Write a values file. Start from values.example.yaml in the chart, which is an EKS install, and give it at least domain, your license, the database and Redis URLs, two keys you generate once (openssl rand -hex 64 for secrets.secretKeyBase, openssl rand -hex 32 for secrets.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 set secrets.existingSecret.

  3. Install the chart:

    helm install docspring-enterprise oci://ghcr.io/docspring/charts/docspring-enterprise \
    --version 1.0.0 --namespace docspring --values values.yaml --timeout 30m

    Helm runs the release Job first, which creates the database schema and the admin user, then the Deployments and CronJobs.

  4. 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

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.

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.