LAB SCENARIO:



Create the Secret:
echo -n 'administrator' | base64
echo -n 'Admin123@@@' | base64

vim secret.yml
# mysecret.yml
apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
data:
username: YWRtaW5pc3RyYXRvcg==
password: QWRtaW4xMjNAQEA=

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




No comments:
Post a Comment