Deploying WordPress and MySQL with Persistent Volumes

Deploying WordPress and MySQL with Persistent Volumes

https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/

LAB SCENARIO:

Create the Secret:

echo -n 'administrator' | base64

echo -n 'Admin123@@@' | base64

vim secret.yml

microk8s kubectl apply -f secret.yml

microk8s kubectl get secret

Download the MySQL/WordPress deployment configuration file.

curl -LO https://k8s.io/examples/application/wordpress/mysql-deployment.yaml

curl -LO https://k8s.io/examples/application/wordpress/wordpress-deployment.yaml

Apply Deployment Files:

microk8s kubectl apply -f mysql-deployment.yaml

microk8s kubectl apply -f wordpress-deployment.yaml

microk8s kubectl get po

microk8s kubectl get po -o wide

Persistent Volume Claim for both deployments:

microk8s kubectl get pvc

Service configured with Load Balance:

microk8s kubectl get services wordpress

microk8s kubectl get deployment

microk8s kubectl get ns

microk8s kubectl get svc


End Of Lab - Good Luck!