Mount Secrets
Mount Kubernetes Secrets into workspace containers to provide sensitive configuration data such as credentials, API keys, and certificates.
Before you begin
- You have an active
ocsession with your project. See This page is not included, but the link has been rewritten to point to the nearest parent document.Getting started with the CLI.Warning:By default, applying a
Secretwith thecontroller.devfile.io/mount-to-devworkspace: 'true'label restarts all running workspaces in the project. To mount the Secret only at workspace start and prevent automatic restarts, add thecontroller.devfile.io/mount-on-start: 'true'annotation.
Procedure
Results
- For
fileorsubpathmounts, verify the Secret data is available at the mount path:$ ls /etc/my-credentials - For
envmounts, verify the environment variables are set:$ echo $DATABASE_URL