Quickstart: Deploy a Drupal site
This guide shows how to deploy a minimal Drupal site using the Drupal Operator.
Prerequisites
- Operator installed and running See Install the operator.
1. Create a Drupal Custom Resource
A simple example Drupal custom resource:
apiVersion: ozzi.io/v1alpha2
kind: Drupal
metadata:
name: example-drupal
namespace: drupal-demo
spec:
drupal_image: drupal:11.2.8-php8.4-apache
drupal_replicas: 1
drupal_locale: en
drupal_user: admin
drupal_password: secretpassword
drupal_db: drupal
drupal_db_username: drupal
drupal_db_pass: mysecret
drupal_cron: true
Save this as example-drupal.yaml and apply it:
kubectl apply -f example-drupal.yaml
2. Wait for Drupal to become ready
The operator will:
- Create ConfigMaps (settings, scripts etc.).
- Create a MariaDB StatefulSet and volume.
- Create a deployment, volume (for files), services and cronjobs.
Watch the pods:
kubectl get pods -n drupal-demo -w
When example-drupal-drupal pods are Running and Ready, the site is up.
3. Access the site
If you are using the default ClusterIP service:
kubectl get svc -n drupal-demo
Look for a service similar to example-drupal-np.
4. First login
The initial admin user and password are set via:
spec.drupal_user(default:drupal)spec.drupal_password(default:drupal)
If you used the example above, the login will be:
- Username:
admin - Password:
secretpassword
Next steps
- Learn about the Drupal CRD fields.
- Set up imports and backups.
- Add Memcached and tuning.