Kubernetes Secrets are a great way to store sensitive configuration data without keeping it in plain text. This lab will provide some practice in working with Secrets and passing sensitive data to containers at runtime.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Retrieve the Old Database Password from the Existing Secret
The existing Secret
db-pass
is in theusers
namespace. Retrieve the password and save it in a file located at/home/cloud_user/dbpass.txt
.- Change the Secret To Use the New Password
Change the password stored in the
db-pass
Secret to the new password. The new password isTrustNo1
.You will need to re-create the Pod for the changes to take effect. The Pod is in the
users
namespace and is calledusers-api
. You can find a manifest for this Pod in/home/cloud_user/users-api.yml
.