IBM/drupal-on-kubernetes-sample(opens in a new tab)
Language: Shell
Setup a Drupal site using Kubernetes and Postgres on IBM Cloud
- stars
- 26
- watchers
- 2
- forks
- 38
- open issues
- 5
- Last updated
- 01/17/2022
Language: Shell
Setup a Drupal site using Kubernetes and Postgres on IBM Cloud
In this Code Pattern, we will setup a Drupal site using Kubernetes and Postgres. Drupal is a popular free and open source content management system 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 the reader has completed this Code Pattern, they will understand how to:
Follow these steps to run Drupal on Kubernetes.
Clone the drupal-on-kubernetes-sample locally. In a terminal, run:
$ git clone https://github.com/IBM/drupal-on-kubernetes-sample
Note: Minimum version 1.10 is required for both Kubernetes server and kubectl client.
Follow the instructions for running Kubernetes locally via Minikube.
Follow the instructions for creating a Kubernetes cluster in IBM Cloud.
Either run 'scripts/quickstart.sh', or run the individual commands listed in it:
kubectl create -f kubernetes/local-volumes.yaml kubectl create -f kubernetes/postgres.yaml kubectl create -f kubernetes/drupal.yaml
After deploying, we need to be sure that all pods are running. Check on the status via:
kubectl get pods -l app=drupal
Once all pod are running we need to know the IP adress of our Drupal.
If you are running in Minikube, run the following:
$ minikube service drupal --url
If you are running in IBM Cloud, we will need to run the following:
$ bx cs workers "$CLUSTER_NAME" OK ID Public IP Private IP Machine Type State Status kube-dal13-cr896f6348d71b4fd1ba151bc7c32abd46-w1 <REDACTED> 10.187.85.198 free normal Ready
Access the newly deployed Drupal site via http://<IP_ADDRESS>:30080
This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.