awesome-k3s-wordpress-helm
A production-ready WordPress Helm chart optimized for K3s with automatic Let's Encrypt SSL, MySQL 8.0, optional Redis caching, and Traefik ingress integration. Deploy WordPress in minutes!
Awesome K3s WordPress Helm
A production-ready WordPress Helm chart optimized for K3s with automatic Let's Encrypt SSL support via cert-manager.
✨ Features
- Automatic SSL - Let's Encrypt certificates via cert-manager
- Persistent Storage - Data survives pod restarts using local-path
- Fully Configurable - Domain, secrets, and image tags via values.yaml
- Production Ready - Resource limits, health checks, and security contexts
- K3s Optimized - Uses Traefik ingress and local-path storage class
- Single Command Deploy - Get WordPress running in minutes
- Optional Redis Cache - Boost performance with object caching
📋 Prerequisites
K3s cluster with Traefik ingress controller (included by default)
cert-manager installed for SSL certificates:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.yamlHelm 3.x installed
DNS configured - Your domain's A record pointing to your k3s node's public IP
🚀 Quick Start
1. Clone the repository
git clone https://github.com/cagatayuresin/awesome-k3s-wordpress-helm.git
cd awesome-k3s-wordpress-helm
2. Create your custom values file
cp wordpress-helm/values.yaml my-values.yaml
3. Edit your values
# my-values.yaml
domain: yourdomain.com
letsencrypt:
email: your-email@yourdomain.com
mysql:
rootPassword: "your-secure-root-password"
password: "your-secure-wordpress-password"
wordpress:
image:
tag: 6.9.0-php8.2-apache
4. Install the chart
helm install my-wordpress wordpress-helm/ -f my-values.yaml
⚙️ Configuration
Essential Parameters
| Parameter | Description | Default |
|---|---|---|
domain |
Your domain name | example.com |
letsencrypt.email |
Email for Let's Encrypt | admin@example.com |
wordpress.image.tag |
WordPress image tag | 6.9.0-php8.2-apache |
mysql.rootPassword |
MySQL root password | changeme-root-password |
mysql.password |
WordPress DB password | changeme-wordpress-password |
Full Configuration Reference
Click to expand all parameters
Namespace
| Parameter | Description | Default |
|---|---|---|
namespace |
Kubernetes namespace | wordpress |
createNamespace |
Create namespace | true |
Domain & SSL
| Parameter | Description | Default |
|---|---|---|
domain |
Your domain | example.com |
enableWwwRedirect |
Handle www subdomain | true |
letsencrypt.email |
Certificate email | admin@example.com |
letsencrypt.server |
ACME server URL | production |
letsencrypt.createClusterIssuer |
Create ClusterIssuer | true |
letsencrypt.clusterIssuerName |
ClusterIssuer name | letsencrypt-prod |
WordPress
| Parameter | Description | Default |
|---|---|---|
wordpress.image.repository |
Image repository | wordpress |
wordpress.image.tag |
Image tag | 6.9.0-php8.2-apache |
wordpress.replicas |
Number of replicas | 1 |
wordpress.tablePrefix |
Database table prefix | wp_ |
wordpress.debug |
Enable WP_DEBUG | false |
wordpress.resources.requests.memory |
Memory request | 256Mi |
wordpress.resources.requests.cpu |
CPU request | 250m |
wordpress.resources.limits.memory |
Memory limit | 512Mi |
wordpress.resources.limits.cpu |
CPU limit | 500m |
MySQL
| Parameter | Description | Default |
|---|---|---|
mysql.image.repository |
Image repository | mysql |
mysql.image.tag |
Image tag | 8.0 |
mysql.rootPassword |
Root password | changeme-root-password |
mysql.database |
Database name | wordpress |
mysql.user |
WordPress user | wordpress |
mysql.password |
WordPress password | changeme-wordpress-password |
mysql.characterSet |
Character set | utf8mb4 |
mysql.collation |
Collation | utf8mb4_unicode_ci |
Persistence
| Parameter | Description | Default |
|---|---|---|
persistence.storageClass |
Storage class | local-path |
persistence.wordpress.enabled |
Enable WP persistence | true |
persistence.wordpress.size |
WP PVC size | 10Gi |
persistence.mysql.enabled |
Enable MySQL persistence | true |
persistence.mysql.size |
MySQL PVC size | 10Gi |
Redis (Optional)
| Parameter | Description | Default |
|---|---|---|
redis.enabled |
Enable Redis cache | false |
redis.image.tag |
Redis image tag | 7-alpine |
redis.password |
Redis password | changeme-redis-password |
redis.maxMemory |
Max memory for cache | 128mb |
redis.persistence.enabled |
Enable Redis persistence | false |
redis.persistence.size |
Redis PVC size | 1Gi |
📖 Usage
Install
helm install my-wordpress wordpress-helm/ -f my-values.yaml
Upgrade
helm upgrade my-wordpress wordpress-helm/ -f my-values.yaml
Uninstall
helm uninstall my-wordpress
⚠️ Note: PersistentVolumeClaims are not deleted automatically. To delete all data:
kubectl delete pvc -l app.kubernetes.io/instance=my-wordpress -n wordpress
✅ Verify Installation
Check pod status
kubectl get pods -n wordpress
Check certificate status
kubectl get certificate -n wordpress
View WordPress logs
kubectl logs -f deployment/my-wordpress-wordpress -n wordpress
🔧 Troubleshooting
Certificate not issuing
Check ClusterIssuer status:
kubectl describe clusterissuer letsencrypt-prodCheck certificate request:
kubectl describe certificaterequest -n wordpressCheck cert-manager logs:
kubectl logs -n cert-manager -l app=cert-manager
Pods not starting
Describe the pod:
kubectl describe pod -l app.kubernetes.io/instance=my-wordpress -n wordpressCheck events:
kubectl get events -n wordpress --sort-by='.lastTimestamp'
Database connection issues
Verify MySQL is running:
kubectl get pods -l app.kubernetes.io/component=mysql -n wordpressCheck MySQL logs:
kubectl logs statefulset/my-wordpress-mysql -n wordpress
🏗️ Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Internet │
└─────────────────────────────────┬───────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Traefik Ingress (K3s) │
│ + Let's Encrypt TLS │
└─────────────────────────────────┬───────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ WordPress Deployment │
│ (wordpress:6.9.0-php8.2-apache) │
│ │
│ ┌─────────────────┐ ┌─────────────────────────────────┐ │
│ │ WordPress Pod │───────▶│ PVC: wordpress-data (10Gi) │ │
│ └────────┬────────┘ └─────────────────────────────────┘ │
└───────────┼─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ MySQL StatefulSet │
│ (mysql:8.0) │
│ │
│ ┌─────────────────┐ ┌─────────────────────────────────┐ │
│ │ MySQL Pod │───────▶│ PVC: mysql-data (10Gi) │ │
│ └─────────────────┘ └─────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
🤝 Contributing
Contributions are welcome! Please read our Contributing Guide for details.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
⭐ Show Your Support
If this project helped you, please give it a ⭐ on GitHub!
📬 Contact
- GitHub: @cagatayuresin
Made with ❤️ for the K3s community
cagatayuresin