kuberneteswordpress

Bitnami How-To Guides for Kubernetes

Deploy WordPress on Kubernetes using Kubeapps

Introduction

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.

TIP: 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:

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 on the “Catalog” link in the navigation bar:

Kubeapps Catalog link

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 community repository, as well as the Bitnami and Kubernetes Service Catalog repository. Enter “wordpress” in the search field and click on the “wordpress” tile to go to the chart page.

Kubeapps Catalog WordPress tile

On this page you can learn about the WordPress chart, review older versions, and any related links. Click “Deploy” to deploy the chart:

Kubeapps WordPress chart page

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.

TIP: You can optionally check out the chart README for advanced configuration options, such as configuring an Ingress.

Set the name of the deployment to “wordpress-tutorial” and click “Submit” to create the deployment:

Kubeapps WordPress deployment form

Once submitted, you will be redirected to a page that describes the state of your deployment. The status will be “Deploying” until WordPress is up and running.

Kubeapps WordPress deployment status

Eventually, a “Deployed” 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:

Kubeapps WordPress access URL

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 login to the admin interface.

WordPress login link

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 “Secrets” section on the deployment status page by clicking on the icon in the data column:

Kubeapps WordPress reveal credential

Copy the revealed password and enter it in the WordPress login form to login:

WordPress login form

Once logged in, you will be taken to the WordPress admin interface where you can create content and manage your blog.

WordPress admin interface

To learn more about the topics discussed in this guide, use the links below:

Last modification July 12, 2019