WordPress is one of the world's most popular web publishing platforms for building blogs and websites. It can be customized via a wide selection of themes, extensions and plug-ins.
This guide walks you through the process of deploying and setting up WordPress in a Kubernetes cluster using Helm and Kubeapps.
Watch the following video or keep reading this tutorial to learn more:
Once you've got WordPress running on Kubernetes, read our guide on performing more complex post-deployment tasks, including setting up TLS with Let's Encrypt certificates and performing rolling updates.
Assumptions and Prerequisites
This tutorial assumes you have the following:
- You have a Kubernetes cluster. Check out our Getting Started with Kubernetes guide for an easy way to get started with one.
- You have Helm v3.x installed in your cluster.
- You have Kubeapps installed in your cluster and are logged into the Kubeapps UI.
Step 1: Deploy WordPress
Once you have installed Kubeapps and are logged into the web UI, you will be taken to the "Applications" page where Kubeapps lists the currently running applications.
To deploy a new application, click the "Catalog" link in the navigation bar:
The "Catalog" page lists the charts from different Helm repositories that are ready to be deployed in the cluster. By default, Kubeapps will display charts from the Bitnami repository.
Enter "wordpress" in the search field and click the "Wordpress" tile to go to the chart page.
On this page you can learn about the WordPress chart, review older versions, and any related links. Click "Deploy" to deploy the chart:
This will take you to a page where you can configure your WordPress deployment. You can give your release a name, change the version you want to deploy, or configure Helm values.
Set the name of the deployment to "wordpress" and click "Submit" to create the deployment:
Once submitted, you will be redirected to a page that describes the state of your deployment. The status will be "Not ready" until WordPress is up and running. Eventually, a "Ready" state can be seen on this page, once all the containers to run WordPress are running and healthy.
Step 2: Access WordPress using the Service Load Balancer
By default, WordPress creates a Service with LoadBalancer type to provide an externally accessible URL for its web interface. Depending on your cloud provider of choice, the load balancer can take some time to provision and will stay in a "Pending" state until it is available. If using Minikube, you will need to run minikube tunnel in a new terminal window in order for an IP address to be assigned.
After some time, the URL should be visible in the Access URL table:
Once it is visible, click one of the URLs shown to access your freshly deployed WordPress blog.
Step 3: Login to WordPress
On the WordPress blog home page, click "Log in" to log in to the admin interface.
As described in the "Notes" section on the deployment status page in Kubeapps, the username for the WordPress blog is "user" and the password is stored in a Secret. You can retrieve the password from the "Application Secrets" section on the deployment status page by clicking the corresponding icon:
Copy the revealed password and enter it in the WordPress login form to login:
Once logged in, you will be taken to the WordPress admin interface where you can create content and manage your blog.
To learn more about the topics discussed in this guide, use the links below: