Solutions to practice test env variables
Run the command ‘kubectl get pods’ and count the number of pods.
Run the command ‘kubectl describe pod’ and look for ENV option
Run the command ‘kubectl describe pod’ and look for ENV option
View the web application UI by clicking on the ‘Webapp Color’ Tab above your terminal.
Set the environment option to APP_COLOR - green.
View the changes to the web application UI by clicking on the ‘Webapp Color’ Tab above your terminal.
Run kubectl get configmaps
Run the command ‘kubectl describe configmaps’ and look for DB_HOST option
Create a new ConfigMap for the ‘webapp-color’ POD. Use the spec given on the right.
Set the environment option to envFrom and use configMapRef webapp-config-map.
View the changes to the web application UI by clicking on the ‘Webapp Color’ Tab above your terminal.