About
The Drupal Operator by Digitalist is a Kubernetes Operator that automates the deployment and lifecycle management of Drupal sites.
It is built with the Operator SDK (Ansible-based) and is designed to:
- Provision and configure Drupal applications
- Optionally deploy and manage MariaDB as the backing database
- Create and manage persistent storage for database and files
- Configure Drupal cron as Kubernetes CronJobs
- Handle database and file imports via dedicated Jobs
- Optionally enable automatic backups for DB and files
- Support sidecars, extra volumes, and custom PHP configuration
The operator watches a custom resource:
apiVersion: ozzi.io/v1alpha2
kind: Drupal
Whenever you create or modify a Drupal resource, the operator reconciles the
cluster state so that the Drupal site matches the desired configuration.
Scope and audience
The operator is intended for:
- Platform teams and SREs who want a repeatable way to deploy Drupal on Kubernetes
- Drupal developers who want self-service environments via simple YAML
- Operations teams who want built-in patterns for imports, backups, and cron
It assumes basic familiarity with:
- Kubernetes concepts (Pods, Deployments, Services, PVCs)
- Container images and registries
- Drupal basics (site install, database, files)
Design highlights
-
Ansible-based operator Reconciliation logic is implemented as Ansible roles and playbooks (primarily
roles/setup), orchestrated viawatches.yaml. -
Cluster-wide The operator runs in its own namespace and can manage Drupal sites in any namespace in the cluster.
-
Declarative workflows Features like DB/file import, cron, and backups are controlled through fields in the
Drupalcustom resource, rather than manual scripts.
Acknowledgements
This project started inspired by:
- https://github.com/thom8/drupal-operator
- https://github.com/geerlingguy/drupal-operator