This workshop has been deprecated and archived. The new Amazon EKS Workshop is now available at www.eksworkshop.com.
Secrets can be also mounted as data volumes on to a Pod and you can control the paths within the volume where the Secret keys are projected using a Pod manifest as shown below:
With the above configuration, what will happen is:
Run the following set of commands to deploy a pod that mounts the database-credentials Secret as a volume.
wget https://eksworkshop.com/beginner/200_secrets/secrets.files/pod-volume.yaml kubectl apply -f pod-volume.yaml kubectl get pod -n octank
View the output logs from the pod to verfiy that the files /etc/data/DATABASE_USER and /etc/data/DATABASE_PASSWORD within the Pod have been loaded with the expected literal values
kubectl logs pod-volume -n octank
The output should look as follows: