Skip to main content
Image
blog-banner-opensenselabs%20%282%29.jpg

Efficacy of Kubernetes in Drupal Deployment

article publisher

Shankar

Drupal

First came the physical servers which were followed by the virtual machines and now the developer ecosystem is rapidly adopting container and serverless computing. One of the biggest challenges that physical servers pose is their management which virtualisation resolves by emulating the real system thereby streamlining the governance of different functions. Now, container and serverless computing are extrapolating the benefits to a whole new level for the developers. And this is where Kubernetes comes into play.

black and white picture of cables over a machine


Google’s Cloud Next 2018 summit held in San Francisco emphasised upon the company’s active involvement in over thousands of open source projects including Kubernetes. By the time Kubernetes was introduced in Google Cloud, it had more than 20,000 contributors which made it one of the fastest moving projects in the open source history. Kubernetes can be a huge asset in the deployment of projects based on another open source framework - Drupal. But before we plunge into that, let’s traverse along the short timeline of Kubernetes’ formation.

Timeline of Kubernetes formation

Kubernetes was originally developed by a team at Google which has been open-sourced since its launch and is managed by a large community of contributors. RisingStack has compiled an interesting timeline which traces the history of Kubernetes with the birth of the Borg system. 

Around 2003-2004, Google introduced the Borg system, a large-scale internal cluster management system, which was followed by the introduction of Omega cluster management system in 2013.

In the mid-2014, Google introduced the open source version of Borg in the form of Kubernetes. In the mid-2015, Kubernetes v1.0 was officially released.

2016 was the year when Kubernetes went mainstream

2016 was the year when Kubernetes went mainstream with more advanced releases, case studies, conferences, and the support for Windows Server and OpenAPI.

In 2017, big enterprises started adopting and supporting Kubernetes with Microsoft, Oracle, Google, IBM, and Amazon coming up with more container orchestration methods using Kubernetes.

A Closer Look at Kubernetes

A blue septagon with a white sailor wheel inside it and kuberneter written


An open source system, Kubernetes is used for handling containerized application across numerous hosts offering basic mechanisms for deployment, maintenance, and scaling of applications. It is hosted by the Cloud Native Computing Foundation (CNCF). CNCF was formed through the partnership of Google and Linux Foundation. It aims to develop sustainable ecosystems. CNCF helps in fostering a community of top-notch projects that orchestrate containers as part of a microservices architecture.

Kubernetes is a portable, extensible open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation - Kubernetes documentation

Kubernetes enables you to deploy containerised application swiftly and predictably and can scale containerised applications on the fly. It seamlessly rolls out new features to your containerised applications and optimises your hardware.

The significant features of Kubernetes include:

Deployment of containers and management of rollout control: With Kubernetes, you can describe your containers and define how many you want in a single deployment. It can govern the running of those containers (even across multiple hosts) and also manage changes like updating images, changing variables etc. to your containers.

  • Resource Bin packing: This lets you declare minimum and maximum computer resources (CPU and memory) for all the containers.
     
  • Service delivery: It has the provision of built-in service delivery for the automatic exposure of containers to the internet or other containers in the Kubernetes cluster.
     
  • Autoscaling: It automatically performs load balancing of traffic across matching containers.
     
  • Heterogenous clusters: It helps in developing a cluster with a mixture of virtual machines, on-premises servers, or bare metal in the company data centre.
     
  • Storage support: It has the provision for persistent storage support with support for Amazon Web Services EBS, Google Cloud Platform persistent disks, and many more. Vendors like Red Hat, Dell, NetApp and EMC offer persistent storage for Kubernetes.
     
  • High availability: It has very high availability such as multi-master and cluster federation enabling the linking of clusters together for load balancing.

Docker vs Kubernetes

Note that Kubernetes is not a replacement for Docker but it is for some of the top-of-the-line technologies that have emerged around Docker.
 
One of those technologies is Docker Swarm which is an orchestrator bundled with Docker. It is possible to leverage Swarm instead of Kubernetes but Docker Inc. has chosen to make Kubernetes a part of the Docker Community and Docker Enterprise editions moving forward.

Kubernetes is significantly more intricate than Docker Swarm

Kubernetes is not a drop-in replacement for Swarm. Kubernetes is significantly more intricate than Swarm and needs more work to deploy. But again, the work involved with the container orchestration using Kubernetes would provide a big payoff in the long run - a more governable, resilient application infrastructure. Docker Swarm is a good choice for the development work and smaller container clusters.

Deploying Drupal using Kubernetes

Bay Area Drupal Camp 2017 had a presentation that exhibited the deployment of Drupal leveraging Kubernetes. A digital agency built a Lagoon platform that builds cloud web hosting solutions for decoupled Drupal with Node.js features. It showed that for scaling Drupal to a plethora of annual page views, decoupled CMS architecture enables the deployment of Docker, Kubernetes and OpenStack solutions together in data centres.


Lagoon platform was created for optimising hosting for Decoupled Drupal sites on the public cloud using OpenStack. With Lagoon, Drupal admins can build containers for PHP with NGINX, run the MYSQL or MariaDB installation in another container with Node.js configured on a third set.

Containers for Redis, Varnish Cache and Solr complete the install managing the load balancing, page caching and auto-scaling web server nodes to match traffic rates. Lagoon relies upon Red Hat Enterprise Linux and the OpenShift platform in addition to the Original Community Kubernetes Distribution (OKD). System admins would have to use Jenkins, Ansible, Vagrant, TravisCI, Puppet, Docker, and CircleCI for configuration.

Programmers and developers would have to be adept with GraphQL, React, Apollo, Next.js and Prometheus. Lagoon leverages Alpine Linux for container installs from Docker images. Content Delivery Network (CDN) integration completes a different production route for anonymous traffic by geolocation thereby optimising datacentre hardware.

Workflow process with Lagoon involves reading the docker-compose.yml and creating disk images which set up the OS for web servers in containers. Then, disk images are pushed to an OS registry like GitHub or BitBicket. Using Ansible, the disk image is pushed to a git repository and commits are made to Node.js for testing. Lagoon deploys disk images from the git repository for Drupal web hosting requirement s in Kubernetes clusters.

Minishift can be leveraged to run OpenShift server administration on the desktop. Lagoon comprises of server-side rendering for Node.js and React on NGINX, running Drupal on NGINX in isolated containers individually. Then, Varnish Cache is used to handle HTML file transfers to users and CDNs.

Market trends

Two rectangular boxes divided by lines with each block showing percentages on the implementation of the Kubernetes solution
Source: 451 Research

A study conducted by technology research and advisory company 451 Research investigated containers adoptions by enterprises across the wide array of industries. It revealed that enterprises of all sizes are rapidly using containers and man are even deploying and governing their containerised workloads with orchestration software. 52% of the organisations gestured that they are running container management and orchestration software in production today and 71% of the respondents were using Kubernetes.
 
Another survey by Portworx Annual Container Adoption in 2017 included insights from 491 IT pros across a variety of industries and company sizes. It delineated that Kubernetes was the preferred option when it comes to container orchestration(shown in the graph below).

A bar graph with different coloured boxes to illustrate the adoption rate of different container orchestration tools
Source: Portworx

Moreover, a report on Transparency Market Research stated that “key drivers of the Kubernetes solutions market are the rapid growth of container orchestration, increase in investment by vendors, more focus on hybrid cloud and multi-cloud, an increase in adoption of Kubernetes by major players offering cloud computing”.

This report also stated that while North America accounts for the largest share of Kubernetes solutions market, Europe trails behind as the second largest. Also, Amazon Web Services, Google Inc., Microsoft Corporation, Red Hat, Inc., Apprenda Inc., UnitedHealth Group, IBM Bluemix, Cisco Systems, Inc., Target, Oracle Corporation, Huawei Technologies Co., Ltd, CenturyLink, Inc. Kismatic, Inc., Heptio, Core OS, Datera, and NavOps are the major vendors.

Conclusion

Drupal as a great content store has grown exponentially due to the presence of its large and active community which is committed towards the perpetual improvement of Drupal to powering digital innovation. Kubernetes, also being an open source software, can of huge help in the Drupal deployment and has made rapid strides with colossal adoption rate among the big enterprises in recent times.

At Opensense Labs, we have been offering a suite of services to provide amazing digital experience to our partners.

Ping us at [email protected] to develop and deploy Drupal-based web applications leveraging the power of Kubernetes.

 

Subscribe

Ready to start your digital transformation journey with us?

Related Blogs

SDC: Integrating Storybook & Single Directory Component

Integrating SDC With Storybook OpenSense Labs

Today, we will talk about about Drupal Single Directory Components or SDC and Storybook. Single Directory Components in Drupal allows you…

RFP: How To Create An RFP For Open Source Solutions?

RFP OpenSense Labs

A good Request for Proposals (RFP) or Call for Proposals (CFP) clearly states the goals and expectations of your project and sets the…

Drupal 7 End Of Life: Top Reasons You Should Migrate To Drupal 10

Drupal 7 End Of Life Cover Image OpenSense Labs

Drupal 10 was released in December 2022 and ever since, the community has been pushing its users to do Drupal 7 to 10 migration. As per…