Challenge, Easy,  on  Kubernetes

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

  1. Create a Secret named config-secret in the orbit namespace with:
    • username=appuser
    • password=apppass
  2. Expose the Secret values as environment variables in the Deployment:
    • CONFIG_SECRET_USERNAME
    • CONFIG_SECRET_PASSWORD
  3. Create another Secret from the YAML definition located at:
    /opt/course/extra-config-secret.yaml
    
  4. Mount this Secret as a volume inside the Deployment at:
    /tmp/extra-config
    
  5. 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