Skip to main content
Dictionary secrets store multiple key-value pairs in a single secret, making them ideal for grouping related configuration values. Each key can be accessed individually when injecting into workloads.

Use Cases

  • Database Configuration: Store host, port, username, and database name together
  • API Configuration: Group related API settings (endpoint, version, timeout)
  • Feature Flags: Store multiple feature toggles in one secret
  • Environment Variables: Bundle related environment variables
  • Application Settings: Group configuration that belongs together logically
Use dictionary secrets when you have multiple related values that you want to manage as a single unit but access individually in your workload.

Configuration Options

Dictionary secrets store key-value pairs where:
All values in a dictionary secret are stored as strings. If you need to store JSON or complex data, use an Opaque secret instead.

Create a Dictionary Secret

1

Navigate to Secrets

In the Console, navigate to Secrets and click New, or use the Create dropdown in the top-right corner and select Secret.
2

Enter basic information

Enter a Name and optional Description.
3

Select secret type

Select Dictionary as the secret type.
4

Configure key-value pairs

Click Data in the left pane. Click Add to add key-value pairs, or drag and drop a file / click to import.
5

Create the secret

Click Create.

Injecting into Workloads

Individual Keys as Environment Variables

Reference specific keys from the dictionary:

Mount as Directory

When mounted as a volume, each key becomes a file:
This creates:
  • /etc/config/DB_HOST containing db.example.com
  • /etc/config/DB_PORT containing 5432
  • /etc/config/DB_NAME containing myapp_production
  • /etc/config/DB_SSL_MODE containing require

Common Patterns

Database Configuration

Redis Configuration

External API Settings


Next Steps

Using Secrets in Workloads

Learn how to grant access and inject secrets

Opaque Secrets

Store single values or complex data