The simplest example of a helm chart for WordPress and MySQL (chart directory).
Also, original manifests provided for using via kubectl (original-manifests directory).
This demo was used with GCP Kubernetes cluster.
- gcloud (installation guide is here)
- kubectl (installation guide is here)
- helm (installation guide is here)
To start using gcloud utility execute next command
gcloud init
Execute the next command to sign in
gcloud auth login
Select your GCP project (if you have one) or create a new one (you can do it via GCP Web Interface)
gcloud projects list
gcloud config set project <YOUR_PROJECT_ID>
Finally, we can setup demo cluster
gcloud container clusters create demo-cluster --zone europe-west4-a
kubectl will be automatically configured to your created cluster
You can check your demo-cluster status with next command
kubectl get nodes
- Clone this git repository
git clone git@github.com:ltblueberry/wordpress-mysql-helm-chart.git
- Execute next commands from repository directory
check that all templates are valid
helm template .
install chart
helm install . --generate-name
- Check your WordPress service External IP address with next command (may take some time)
kubectl get service -n demo-application
By-default namespace that used in the chart called demo-application. If you changed it, make sure you define the proper namespace in kubectl get command.
Now you can check this IP address with web-browser
Defined in values.yaml
Name | Default Value | Difinition |
---|---|---|
namespace |
demo-application |
Kubernetes namespace |
Name | Default Value | Difinition |
---|---|---|
deployment.image |
wordpress:4.8-apache |
Docker image for Wordpress |
deployment.replicaCount |
1 |
Number of Pods to run |
service.type |
LoadBalancer |
Kubernetes Service type |
service.port |
80 |
Publishing port |
Name | Default Value | Difinition |
---|---|---|
deployment.image |
mysql:5.6 |
Docker image for MySQL |
deployment.replicaCount |
1 |
Number of Pods to run |
service.type |
ClusterIP |
Kubernetes Service type |
service.port |
3306 |
Publishing port |
pvc.accessMode |
ReadWriteOnce |
PVC Access mode |
pvc.storage |
2Gi |
PVC Storage size |
- Execute the next command to get the list of helm releases
helm list
- Execute the next command to uninstall helm release by RELEASE_NAME
helm uninstall RELEASE_NAME
Copyright (c) 2020 ltblueberry