WordPress Kubernetes
WordPress Kubernetes
by DigitalOcean

Version 5.2.4



WordPress is Open Source software designed for everyone, emphasizing accessibility, performance, security, and ease of use to create a website, blog, or app. WordPress is a content managment system (CMS) built on PHP and using MySQL as a data store, powering over 30% of internet sites today.

This DigitalOcean Marketplace Kubernetes 1-Click installs WordPress and MariaDB onto your Kubernetes cluster via Helm Charts. This 1-Click makes use of a DigitalOcean LoadBalancer with Kubernetes Ingress so you can view your WordPress site at a public URL. To help manage your data two DigitalOcean Volumes are used with Kubernetes Persistent Volumes for the WordPress and MariaDB services.

Thank you to all the contributors whose hard work make WordPress valuable for users.

Software Included

Getting started after deploying WordPress Kubernetes

Getting Started with DigitalOcean Kubernetes

As you get started with Kubernetes on DigitalOcean be sure to check out how to connect to your cluster using kubectl and doctl.

Additional instructions are included in the DigitalOcean Kubernetes control panel.

Kubernetes Quick Start

If you just want to give this app a quick spin without doctl give the following a try.

Assuming you have done the following:

  1. Created a cluster in the DigitalOcean control panel.
  2. Downloaded the Kubernetes config file to ~/Downloads directory on your local machine. The config file will have a name like wordpres-k8s-1-16-sfo-kubeconfig.yaml.
  3. Installed Kubernetes command line tool, kubectl, on your local machine.

Copy the Kubernetes config file to the default directory kubectl looks in.

cp ~/.kube/config  ~/.kube/config.bkup
cp  ~/Downloads/wordpress-k8s-1-16-sfo-kubeconfig.yaml  ~/.kube/config

You should now be able to connect to your DigitalOcean Kubernetes Cluster and successfully run commands like:

kubectl get pods -A

Confirm WordPress is running on Kubernetes

After you are able to successfully connect to your DigitalOcean Kubernetes cluster you’ll be able to see WordPress running in the wordpress namespace by issuing:

 kubectl get pods -n wordpress

Confirm all wordpress pods are in a “Running” state under the “STATUS” column:

NAMESPACE             NAME                           READY   STATUS      RESTARTS   AGE
wordpress             wordpress-85589d5658-pxv8q     1/1     Running     0          10m
wordpress             wordpress-mariadb-0            1/1     Running     0          10m

Connect to WordPress

1. Get the WordPress URL:

It may take a few minutes for the LoadBalancer IP to become available. Watch the status with:

kubectl get svc -n wordpress wordpress -w

(Press ctrl-c to stop watching for the LoadBalancer IP.)

Look for an IP address to be come available under EXTERNAL-IP. Get the IP by:

export WORDPRESS_IP=$(kubectl get svc -n wordpress wordpress -o jsonpath='{.status.loadBalancer.ingress[*].ip}')
echo "WordPress URL: http://$WORDPRESS_IP/"
echo "WordPress Admin URL: http://$WORDPRESS_IP/admin"

2. Login with the following credentials to see admin your WordPress site.

Username = user

Get the password:

echo Password: $(kubectl get secret --namespace wordpress wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)

Checkout the WordPress docs for more info on using WordPress. Happy hacking!

API Creation

In addition to creating WordPress Kubernetes via the control panel, you can also use the DigitalOcean API.

As an example, to create a 3 node DigitalOcean Kubernetes cluster made up of Basic Droplets in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.

  curl -X POST -H "Content-Type: application/json" \
      -H "Authorization: Bearer '$TOKEN'" -d \
      '{"name": "choose-a-name","region": "sfo2","version": "1.17.5-do.0","node_pools": [{"size": "s-1vcpu-2gb","count": 3,"name": "choose-a-name"}]}' \

Support Details

Supported By:DigitalOceanDigitalOcean
Support URL:https://wordpress.org/support/forums/

More DigitalOcean Links

DigitalOcean Community

Developers supporting developers

Ask a Question

Ask anything related to system administration, programming, devops, open source, or the DigitalOcean platform.

List your 1-Click App in the DigitalOcean Marketplace

Partner with us to build traction for your open source project or software company