Secrets
Values your workloads need that nobody should read back. For example passwords, API keys and tokens.
On this page
What it is
A secret is a confidential value. klickops stores it encrypted and hands it to the workload when it starts. After that, klickops never shows you the value again. Configuration that isn't secret sits next to it under Configuration. Both look the same. They only differ in how sensitive they are.
Secrets belong to the project. All workloads in the project share the same secrets. If two apps need the same API key, it exists only once. Two copies could drift apart over time.
When you'd use it
- For a third-party API key, an SMTP password or a signing token.
- For credentials you change regularly. You then change them in one place.
- For anything you wouldn't want to see in a screenshot.
Database credentials don't belong here. A database passes its connection details to the app itself. That link updates when the password changes. If you copy the details into a secret, you have a second copy. That copy goes stale. See Databases.
Add a secret
- Open the project and go to Configuration.
- Add a key and its value. Keys are uppercase with underscores, like environment variables.
- Save. Workloads that use the secret restart. Before you confirm, the bar at the bottom shows how many.
From now on, you can only overwrite the value. You can't read it anymore. That goes for the UI, the API and every list. Lost the value? Then create a new one with the provider who issued it.


Using one in a workload
Open the app, go to Configuration and pick the keys it should get. Each key arrives in the app as an environment variable with its own name.
A workload only gets the keys you select. The secrets live in one place in the project. Still, not every workload sees everything.
Settings reference
| Setting | Default | What it does |
|---|---|---|
| Key | none | The name of the environment variable. Uppercase, with underscores, unique in the project. |
| Value | none | You can overwrite it, but never read it. |
| Used by | none | The workloads that get this key. Changing this restarts them. |
Limits and gotchas
- You can't read a value back. That is exactly what secrets are for. It still surprises everyone once. Keep the value wherever you got it from.
- Changing a secret restarts every workload that uses it. A container reads its environment when it starts. It can't change inside a running container.
- A secret is not a file. Certificates and config files have to exist on disk. Mount those as a volume.
- A deleted key is simply missing. The workload restarts, and the variable is gone. Usually the app then crashes on start. You often don't get a clear message.