This repo deals with deploying wordpress and mysql on k8s
Steps to deploy the services:
- First create secrets by running
kubectl apply -f secret.yml. - Create mysql service,pvc and delployment by running
kubectl apply -f mysql.yml. - Create wordpress service,pvc and deployment by running
kubectl apply -f wordpress.mysql. - Now run the commands to check the resources:
kubectl get pvc && kubectl get pods && kubectl get svc. - If you are running the above resources in minikube, then run
minikube service wordpressServiceNameto access the portal/frontend. - If you are running on any cloud based k8s service, Make sure the loadbalancer is created and accessible by exposing it to public.
- If you want to change the secrets, replace the encoded value with your password. Cmd to encode is
echo -n 'my-string' | base64and to decodeecho -n 'bXktc3RyaW5n' | base64 --decode