DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Kubernetes Package Management With Helm
  • An Overview of Popular Open-Source Kubernetes Tools
  • Why Use LocalPV with NVMe for Your Workload?
  • GitOps: Flux vs Argo CD

Trending

  • How To Develop a Truly Performant Mobile Application in 2025: A Case for Android
  • Fixing Common Oracle Database Problems
  • Integrating Security as Code: A Necessity for DevSecOps
  • AI-Powered Professor Rating Assistant With RAG and Pinecone
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Deploy WordPress on Kubernetes in 15 Minutes Using Helm

Deploy WordPress on Kubernetes in 15 Minutes Using Helm

Learn how to deploy the world's most widely used portal application on the world's most powerful application runtime in no time.

By 
Samit Das user avatar
Samit Das
·
Jan. 29, 21 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
11.9K Views

Join the DZone community and get the full member experience.

Join For Free

Why Run a WordPress Site on Kubernetes?

WordPress is a free and open-source website building platform. Using WordPress,  anybody can make any kind of website. Years ago, it started out as a blogging platform but soon transformed into a CMS and later into a full-fledged website building platform. Written in PHP and paired with a MySQL or MariaDB database, WordPress has a plugin and template architecture and an infinitely long ecosystem to power websites with plug-ins and themes (template).

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It organises applications in logical units of containers for easy deployment, discovery, management. Kubernetes is THE platform for running modern applications as scale, in a resilient manner with declarative configuration and automation.

Why Helm?

Helm is a package manager for Kubernetes. It helps to package, configure, and deploy applications and services in a Kubernetes cluster. Helm uses a packaging format called charts; a Helm chart is a collection of YAML files that describe a related set of Kubernetes resources.

Setting up a WordPress instance on the Kubernetes cluster will help you to have a hosting infrastructure that can scale dramatically and provide resilience, flexibility powered by Kubernetes.

So, let's set this up in 15 minutes. 

I have provided the step by step to install and run a WordPress instance on a Kubernetes cluster. I have run it locally as well as in Google Cloud Platform (GCP).

Setup a Kubernetes Cluster (in GCP)


Shell
 




x


 
1
# Create Cluster
2
gcloud container clusters create sam-cluster-001 \
3
--zone us-central1-a --additional-zones us-central1-b,us-central1-c
4
 
          
5
# Update Kubeconfig file
6
gcloud container clusters get-credentials standard-cluster
7
 
          



Install Helm

Installation of Helm is quite easy. Install the available helm package for your desktop or your working OS.

Shell
 




xxxxxxxxxx
1
15


 
1
## Install Helm 
2
# for Mac
3
brew install kubernetes-helm
4
 
          
5
## for ubuntu
6
# download Helm binary
7
wget https://get.helm.sh/helm-v3.0.2-linux-amd64.tar.gz
8
 
          
9
# unzip & install Helm
10
tar xvf helm-v3.0.2-linux-amd64.tar.gz
11
sudo mv linux-amd64/helm /usr/local/bin/
12
 
          
13
# review the version installed
14
helm version
15
 
          



version.BuildInfo

Update Helm Repo

Now, we’ll install a chart from the repository. But if your helm is installed a while back, you need to update the repository.

Shell
 




xxxxxxxxxx
1


 
1
# Update helm chart repo - to get the latest list of charts
2
helm repo add stable https://charts.helm.sh/stable --force-update
3
 
          



Find WordPress in Helm repo

Helm makes use of chart repositories. A chart repository is a remote server (connected over HTTP protocol) that holds an index.yaml file and (optionally) packaged charts. A chart is a collection of files that describe a set of Kubernetes resources. A chart may be used to deploy a simple pod or one that contains a complex stack of applications and services.

List out the available charts.

Shell
 




xxxxxxxxxx
1


 
1
## search Helm repo
2
helm search repo stable
3
 
          



available charts

Find the WordPress Chart

The list of artifacts for WordPress is packaged into a chart that can be easily deployed, using Helm. In order to do this, you must first find the WordPress chart repository in the official stable repository.


Shell
 




xxxxxxxxxx
1


 
1
helm search repo stable | grep wordpress



Results of helm search repo stable

Installing WordPress

Install WordPress using the above chart from the stable repo.

Shell
 




xxxxxxxxxx
1


 
1
helm install stable/wordpress --generate-name


Results of helm install stable/wordpress --generate-name

Congratulations!!!

WordPress is now deployed in the Kubernetes cluster.

Apps running

App IPs

You can see the WordPress web front-end too (for login, use the password generated above):

WordPress web front-end

Now, you have a WordPress instance on the Kubernetes cluster — a modern runtime platform that can scale, is resilient, and can be used to expose your portal application or blog to the world.

Kubernetes WordPress Chart Open source cluster application

Opinions expressed by DZone contributors are their own.

Related

  • Kubernetes Package Management With Helm
  • An Overview of Popular Open-Source Kubernetes Tools
  • Why Use LocalPV with NVMe for Your Workload?
  • GitOps: Flux vs Argo CD

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!