Taxonomy Icon

Containers

Run a Drupal website on Kubernetes

Grab the code

Summary

Drupal is a popular, free, and open source CMS (content management system) that is used as the backend for millions of web sites worldwide. This pattern demonstrates how to break a Drupal site into microservices for speed and resiliency. This pattern is for the developer who’s specifically looking to run a Drupal site on Kubernetes. Powered by Kubernetes, the orchestration provides an easy way to leverage the scalability and power of Drupal, so that you can easily stay current with its new releases without compromising your site.

Description

In this pattern, we will set up a Drupal site by using Kubernetes and Postgres. Drupal is a popular open-source CMS (content management system) that is used as the backend for millions of web sites worldwide. By splitting out the services into containers, we have the ability to leverage the power of Kubernetes.

When you complete this pattern, you will understand how to:

  • Configure an app that runs multiple containers in Kubernetes.
  • Run a website hosted via Kubernetes.
  • Use Kubernetes-persistent volumes to maintain Drupal configurations between container restarts.

Flow

flow

  1. User interacts with the Drupal web interface.
  2. The Drupal container uses its persistent volume to store website data (but not content).
  3. Drupal container connects to PostgreSQL container to access website content.
  4. PostgreSQL container uses its persistent volume to store the database contents.

Instructions

  1. Clone the repo.
  2. Create a Kubernetes cluster.
  3. Create the service and deployment.
  4. Access Drupal.

Ready to put this pattern to use? Complete details on how to get started running and using this application are in the README.