Set and Use Secrets in a Kubernetes Deployment
Scenario
You are working with a Kubernetes Deployment in the orbit namespace.
An existing Deployment named config-deployment is already running.
Tasks
- Create a Secret named
config-secretin theorbitnamespace with:username=appuserpassword=apppass
- Expose the Secret values as environment variables in the Deployment:
CONFIG_SECRET_USERNAMECONFIG_SECRET_PASSWORD
- Create another Secret from the YAML definition located at:
/opt/course/extra-config-secret.yaml - Mount this Secret as a volume inside the Deployment at:
/tmp/extra-config - Update the existing Deployment to use both Secrets.
🧪 Test Case:
Level up your Server Side game — Join 20,000 engineers who receive insightful learning materials straight to their inbox