Solutions for pracice test - Secrets
Run the command ‘kubectl get secrets’ and count the number of pods.
Run the command ‘kubectl get secrets’ and look at the DATA field
Run the command ‘kubectl describe secret’
Run the command ‘kubectl describe secret’
We have already deployed the required pods and services. Check out the pods and services created. Check out the web application using the ‘Webapp MySQL’ link above your terminal, next to the Quiz Portal Link.
Run command kubectl create secret generic db-secret –from-literal=DB_Host=sql01 –from-literal=DBUser=root –from-literal=DB_Password=password123
Check Answer at /var/answers/answer-webapp.yaml
Update web.yaml with secret section
envFrom:
View the web application to verify it can successfully connect to the database