LAB SCENARIO:



Create the Secret:
echo -n 'administrator' | base64echo -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.ymlmicrok8s kubectl get secret
Download the MySQL/WordPress deployment configuration file.
curl -LO https://k8s.io/examples/application/wordpress/mysql-deployment.yamlcurl -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 pomicrok8s 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 deploymentmicrok8s kubectl get nsmicrok8s kubectl get svc





No comments:
Post a Comment