drupal

by HelmForge

Helm chartv1.4.2App 11.4.13Apache-2.0Verified publisher

Production-ready Drupal CMS with seeded sites persistence, S3 backups, and safe horizontal scaling controls

About this chart

Drupal

A production-ready Helm chart for deploying Drupal on Kubernetes with seeded sites/ persistence, scheduled S3 backups, and safe horizontal scaling guardrails.

Important runtime note:

  • This chart uses docker.io/library/drupal.
  • Drupal upstream does not currently publish its own upstream-maintained runtime container image.
  • HelmForge pins the Docker Official Apache image explicitly to 11.4.13-php8.5-apache-bookworm, which is published by the Docker Official Drupal image repository.
  • The chart prepares runtime, persistence, ingress, backup automation, and database connectivity, then guides the final site installation through Drupal's web installer.

Install

HTTPS repository

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install drupal helmforge/drupal

OCI registry

helm install drupal oci://ghcr.io/helmforgedev/helm/drupal

Quick Start

helm install drupal oci://ghcr.io/helmforgedev/helm/drupal \
  --set ingress.enabled=true \
  --set ingress.hosts[0].host=drupal.example.com \
  --set ingress.hosts[0].paths[0].path=/ \
  --set ingress.hosts[0].paths[0].pathType=Prefix

Then:

  1. Wait for the Drupal pod and the MySQL subchart to become ready.
  2. Open the Drupal URL.
  3. Follow the installer.
  4. Use the database details printed in NOTES.txt.

Features

  • Pinned production image — uses drupal:11.4.13-php8.5-apache-bookworm, keeping the Drupal release, PHP runtime, and Debian base explicit
  • Seeded sites/ persistence — preserves installer output and uploads without masking Drupal core files from the image
  • Built-in backup automation — archives sites/ and backs up either MySQL or SQLite to S3-compatible storage
  • Safe scaling model — single replica by default, with fail-fast guardrails for multi-replica or HPA use
  • Installer-aware database paths — bundled MySQL, external MySQL-compatible database, or SQLite
  • Production knobs included — default resource requests/limits, optional HPA, optional PDB, ingress, and custom PHP configuration
  • Real listener configuration — containerPorts.http updates both the Pod declaration and the official image's Apache configuration
  • Secure Kubernetes defaults — API token automount disabled, privilege escalation blocked, RuntimeDefault seccomp, and optional NetworkPolicy

Architecture

Users reach Drupal through an optional Ingress and a Service whose named targetPort selects the configurable Apache listener. The Deployment mounts only /var/www/html/sites from persistent storage, preserving mutable site state without shadowing Drupal core from the pinned image. The default MySQL 2.4.0 subchart can be replaced with an external MySQL-compatible service or, for a single replica, SQLite within the sites volume. An optional CronJob archives the sites volume and database to S3-compatible storage.

See DESIGN.md for the Mermaid topology, trust boundaries, observability boundary, and known limitations.

Upstream Version Notes

Drupal 11.4.13 is a security and maintenance release. Review the official release notes.

Before upgrading production workloads, test the site in staging with the same PHP extensions, Composer dependency set, storage class, and database mode used in production. Review the Drupal 11.4.13 release notes before running database updates.

Production Example

ingress:
  enabled: true
  ingressClassName: nginx
  hosts:
    - host: drupal.example.com
      paths:
        - path: /
          pathType: Prefix

persistence:
  accessMode: ReadWriteMany
  size: 20Gi

autoscaling:
  enabled: true
  minReplicas: 2
  maxReplicas: 6

pdb:
  enabled: true
  minAvailable: 1

backup:
  enabled: true
  s3:
    endpoint: https://minio.example.com
    bucket: drupal-backups
    existingSecret: drupal-backup-s3

Minimal Example

replicaCount: 1

mysql:
  enabled: true
  auth:
    database: drupal
    username: drupal

persistence:
  enabled: true
  size: 8Gi

SQLite Example

database:
  mode: sqlite

mysql:
  enabled: false

In the Drupal installer, choose SQLite and use:

sites/default/files/.ht.sqlite

External Database Example

database:
  mode: external
  external:
    host: db.example.com
    port: 3306
    name: drupal
    username: drupal

mysql:
  enabled: false

Main Parameters

KeyDefaultDescription
replicaCount1Number of Drupal replicas.
image.repositorydocker.io/library/drupalDrupal image repository.
image.tag11.4.13-php8.5-apache-bookwormDrupal image tag.
image.configureApachePortnullAuto-configure Apache for a non-default port on the official image; custom compatible images must opt in.
containerPorts.http80Actual Apache listener and Pod container port.
service.port80Service-facing port; its named target resolves to containerPorts.http.
database.modeautoDatabase mode: auto, external, mysql, or sqlite.
mysql.enabledtrueDeploy bundled MySQL.
mysql dependency2.4.0Pinned HelmForge MySQL subchart version.
mysql.auth.databasedrupalDatabase name created by the MySQL subchart.
mysql.auth.usernamedrupalDatabase username created by the MySQL subchart.
mysql.standalone.persistence.enabledtrueEnable persistence for the bundled standalone MySQL subchart.
mysql.standalone.persistence.size8GiBundled standalone MySQL PVC size.
persistence.enabledtrueEnable persistence for /var/www/html/sites.
persistence.accessModeReadWriteOnceUse ReadWriteMany for safe multi-replica Drupal.
persistence.size8GiSites PVC size.
autoscaling.enabledfalseEnable HPA when using RWX storage and a MySQL-compatible database.
pdb.enabledfalseEnable a PodDisruptionBudget for higher-availability deployments.
backup.enabledfalseEnable scheduled sites/ + database backups to S3-compatible storage.
backup.s3.credentialsFromPodIdentityfalseUse workload identity instead of static S3 keys.
backup.s3.region""AWS region required for identity-based S3 credentials.
backup.serviceAccount.createtrueCreate the dedicated identity-bound backup ServiceAccount.
php.ini"" via php.iniExtra PHP configuration content.
ingress.enabledfalseEnable ingress.
networkPolicy.enabledfalseRestrict Drupal ingress with a Kubernetes NetworkPolicy.
networkPolicy.egress.enabledfalseAdd explicit DNS, database, HTTPS, SMTP, or custom egress rules.
serviceAccount.automountServiceAccountTokenfalseMount a Kubernetes API token in Drupal pods.
drupal.sqlitePathsites/default/files/.ht.sqliteSuggested SQLite path for installer use.

Configuration

Application and service ports

containerPorts.http controls the real Apache listener. service.port is the independent client-facing Service port and targets the named http container port. With the official Drupal image, the chart automatically prepares Apache configuration when the listener differs from 80:

containerPorts:
  http: 8080

service:
  port: 80

Custom images retain their own entrypoint contract. A custom image using the official /etc/apache2 layout must set image.configureApachePort=true; the chart rejects an ambiguous non-default port otherwise.

Network isolation

NetworkPolicy is opt-in because Drupal commonly reaches update services, SMTP, external databases, and integrations. Start with ingress isolation, then enable egress only after enumerating every required destination:

networkPolicy:
  enabled: true
  ingress:
    allowSameNamespace: false
    extraFrom:
      - namespaceSelector:
          matchLabels:
            kubernetes.io/metadata.name: ingress-nginx
        podSelector:
          matchLabels:
            app.kubernetes.io/name: ingress-nginx
            app.kubernetes.io/component: controller
  egress:
    enabled: true
    allowDNS: true
    allowSameNamespaceDatabase: true
    allowHTTPS: true

The cluster CNI must enforce NetworkPolicy. Adjust namespace and pod selectors to match the ingress controller and database placement in your cluster.

Operational Notes

  • The chart does not auto-run the Drupal installer.
  • Backup automation requires S3-compatible storage credentials and persistence.enabled=true.
  • Multi-replica Drupal requires ReadWriteMany storage and a MySQL-compatible database; the chart blocks unsafe combinations.
  • SQLite is supported for single-replica installs, including automated backups, but it is still not the preferred production path for most Drupal sites.

Troubleshooting

Inspect the workload, application logs, and the persistent sites directory:

kubectl get pods -l app.kubernetes.io/name=drupal
kubectl logs deploy/<release>-drupal -c drupal --tail=100
kubectl exec deploy/<release>-drupal -- ls -la /var/www/html/sites

For a non-default listener, confirm the init container completed and Apache is listening on the configured port:

kubectl logs deploy/<release>-drupal -c configure-apache-port
kubectl exec deploy/<release>-drupal -c drupal -- apache2ctl -S

If a NetworkPolicy blocks traffic, verify the ingress controller namespace and database selectors, then inspect the rendered policy with kubectl describe networkpolicy <release>-drupal.

Additional Reading

  • docs/database.md
  • docs/backup.md
  • docs/persistence.md
  • docs/scaling.md

Security Scan: drupal

FrameworkScore
MITRE + NSA + SOC283.33%

Rendered-manifest scan using Kubescape 4.0.13. Review application and database security settings, filesystem permissions and network isolation for the production deployment.

Deploy drupal with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has drupal on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdrupal is pinned at v1.4.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply