← Back to blog
bpdubuntu

Deploying a WordPress Blog on Kubernetes

30 January 2026bpd · ubuntu

From Docker Compose to a Kubernetes Deployment

Learning Kubernetes means learning its declarative API. The ‘Ubuntu System Administration Guide’ provides a hands-on example of how to deploy the same WordPress application from the Docker Compose example onto your local Minikube cluster using YAML manifest files.

Defining Your Application

You’ll create two main files:

  1. mysql.yaml: This file defines a `Deployment` to run the MySQL container (as a Pod) and a `Service` to allow other Pods within the cluster to connect to it.
  2. wordpress.yaml: This defines a `Deployment` for the WordPress container and a `Service` of type `LoadBalancer`, which exposes the WordPress site to be accessible from your web browser outside the cluster.

By applying these files with the `kubectl apply -f` command, you tell Kubernetes the desired state of your application, and it handles the rest.


This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13