Skip to main content
Opaque secrets are the most flexible secret type, allowing you to store any text-based data. Use them for API keys, tokens, configuration values, or any sensitive string that doesn’t fit into a more specific secret type.

Use Cases

  • API Keys: Store third-party API keys (Stripe, Twilio, SendGrid)
  • Tokens: JWT secrets, session tokens, webhook signing secrets
  • License Keys: Software license keys and activation codes
  • Configuration Values: Sensitive configuration that doesn’t fit other types
  • Custom Credentials: Any text-based secret data

Configuration Options

FieldDescriptionRequired
payloadThe secret value to storeYes
encodingHow the payload is encoded: plain or base64Yes
When encoding is set to base64, the payload will be automatically decoded when accessed by workloads. This is useful for storing binary data or pre-encoded values.

Create an Opaque Secret

1

Navigate to Secrets

In the Control Plane 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 Opaque as the secret type.
4

Configure secret data

Click Data in the left pane. Paste the secret content, drag and drop a file, or click to import. If your data is base64 encoded, enable Base64 Decode at Runtime to decode it when accessed.
5

Create the secret

Click Create.

Injecting into Workloads

Reference the secret in your workload as an environment variable:
env:
  - name: API_KEY
    value: "cpln://secret/my-api-key"
Or mount it as a file:
volumes:
  - uri: "cpln://secret/my-api-key"
    path: /secrets/api-key.txt

Next Steps