Dave Rendón Microsoft Azure MVP, embracing and fostering tech intensity to benefit society and thrive in a digital world.

Deploy WordPress on Azure Kubernetes Service

2 min read


Thank you for your interest in WikiAzure. We're proactively working on a new platform, new content can be found in: https://azinsider.net

This is article intends to be a guide to quickly deploy WordPress on Azure Kubernetes Service using CLI.

Pre-requisites to deploy WordPress on Azure Kubernetes Service

  •  Install AKS CLI, you can do so by using the cmd below
az aks install-cli
  • Install kubernetes cli using chocolatey , you can do so by running the cmd below (run as admin)
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
  •  Install Kubernetes CLI, you can do so using the cmd below:
choco install kubernetes-cli
  • Install Helm using the cmd below:
choco install kubernetes-helm

Create your Azure Kubernetes Cluster

First and foremost I will create a new resource group through Azure CLI. Using Windows Terminal run the cmd to set your default subscription:

az account set --subscription "Your-Subscription-Name"

In this case:

az account set --subscription "cloud trainee"

Now let’s create a new resource group in which we will provision our Azure Kubernetes Cluster:

az group create --name aks-wp-demo --location eastus



Let’s proceed to create AKS cluster. The cluster creation process can take up to 15 minutes.

az aks create --name aks-wp-demo --resource-group aks-wp-demo --node-count 3 --generate-ssh-keys



Now you have created your Azure Kubernetes Cluster! You can also check on the Azure Portal your new Azure Kubernetes Cluster:


Once created let’s configure kubectl to use the credentials for the new AKS cluster:

az aks get-credentials --name aks-wp-demo --resource-group aks-wp-demo

Now add the Azure Marketplace repo to the Helm repository:

helm repo add azure-marketplace https://marketplace.azurecr.io/helm/v1/repo



Check the configuration of your Azure Kubernetes Cluster

List all the contexts in your kubeconfig file:

kubectl config get-contexts



Now let’s install a clean installation of WordPress using Helm:

helm install aks-wp-demo azure-marketplace/wordpress

Now you should see the details of the installation of your WordPress on Azure Kubernetes Service:


Now you can check your installation with the cmd below to fetch all Pods in all namespaces using:

kubectl get pods -w

You can use the kubectl get svc command to see which IP address is in use

kubectl get svc

Now go to the the WordPress installation using the External-IP on your browser, you should see your WordPress on Azure Kubernetes Service up and running:


In order to access to the wordpress admin panel we need to RETRIEVE CREDENTIALS using:

kubectl get secret

Let’s get the encrypted password with the comand below:

kubectl get secret aks-wp-demo-wordpress -o yaml

You can DECRYPT PASSWORD USING: www.base64decode.org

  1. Copy the password from the previous step
  2. Paste the password on the first textbox
  3. Click decode
  4. Copy the wordpress password

Now you can access to the /wp-admin directory of your wordpress installation using that password, the username is “user” as shown in previous steps.

Maintain your WordPress installation!

Later on you might need to take some specific actions for maintenance, so you can list all of your current releases using the command below, this command lists all of the releases for a specified namespace (uses current namespace context if namespace not specified):

helm list

You might need to UPGRADE your repo, to do so you can use the cmd below:

helm repo update

In case you need to Check for newer version:

helm inspect chart azure-marketplace/wordpress

In case you want to upgrade if a new version is available:

helm upgrade aks-wp-demo azure-marketplace/wordpress

Additional resources:



Along this article we reviewed how you can deploy WordPress on Azure Kubernetes Service. We created a new Resource Group on Azure, then created the Azure Kubernetes Cluster, later on we deployed WordPress on top of AKS and reviewed how to access to the WordPress instance and some tips on how to maintain your WordPress installation.

Dave Rendón Microsoft Azure MVP, embracing and fostering tech intensity to benefit society and thrive in a digital world.

5 Replies to “Deploy WordPress on Azure Kubernetes Service”

  1. Hi, your blog post is very interesting but how can you update the wordpress website. for example add some contents ?

    1. Hi Jean,

      Thanks for taking the time to review this article, once your WordPress installation is operational you can login to the “http://Your-External-IP/wp-admin” directory and start configuring your WordPress site.

      Let me know if you have any additional questions


  2. How do you scale the number of replicas for wordpress? I know how to modify the replicas using kubectl edit, but to the best of my knowledge, 1 azure disk can only be mounted on one node. So how do wordpress pods on other nodes access the same azure disk?

    1. Hi Parth,

      Thanks much for taking the time to go over this blog post, if I understand correctly, you are provisioning wordpress on AKS and want to make use of a persistent volume so that multiple nodes can access to the same storage? If that’s the case then probably define the persistent volume and make use of Azure Files – https://docs.microsoft.com/en-us/azure/aks/concepts-storage

      Let me know your thoughts,


Leave a Reply

Your email address will not be published. Required fields are marked *