Wordpress in Kubernetes Microtutorial
How to run WordPress in a local Kubernetes cluster with K3S under Docker. Adapted from Deadsimple Wordpress in Kubernetes. Get set-up fast.
Step 1: Install Dependencies
- Lens
- Docker
- Git
- Kubernetes CLI
- K3D
- Helm
- Watch
Step 2: Clone Sources
- https://codeberg.org/vhs/wordpress-helm
- https://codeberg.org/vhs/WordPress
Step 3: Create Cluster
k3d cluster create k3s-wordpress -i rancher/k3s:latest \
--api-port 6550 --agents 2
Step 4: Update WordPress
cd wordpress && \
rm -rf wp-content/themes/twenty* && \
git commit -m "perf: ⚡️ remove theme cruft" && \
git push -u gitlab default
Step 5: Prepare Chart
cd ../wordpress-helm && \
cp install.sh.example install.sh && chmod +x install.sh && \
cp values-local.yaml.example values-local.yaml
Step 6: Install Chart
./install.sh -n sandbox
Step 7: Forward Port
kubectl port-forward service/wordpress-production 80:8080 -n sandbox