Secret
A Secret is a DataOS Resource designed for securely storing sensitive information at the DataOS Tenant-level
A Secret keeps credentials out of other Resource manifests. You can define the Secret itself in YAML, but you store the sensitive value once in that Secret and reference the Secret by name from other Resources. That separation is the point: credentials stay centralized instead of being repeated across manifests, which reduces accidental exposure when Resources are created, viewed, or edited.
Access requirements
Before creating or managing a Secret, ensure you have the required permissions. See Secret: Access control.
Structure of a Secret manifest file
A Secret manifest carries the standard Resource fields (name, version, type: secret) plus a spec that holds the credential as key-value pairs. For the full field-by-field breakdown, see Attributes of a Secret manifest. To create one for a specific use case, start with the relevant guide below.
How to create a Secret?
Choose the guide that matches where the Secret will be used.
Data sources: Source-specific Secret guides for supported data sources.
Repositories: Secret guides for hosted repository credentials.
Container registries: Secret guide for pulling private container images.
Projections: Runtime projection patterns for exposing selected Secret values to workloads.
Configurations
Secret can be configured to secure credential information through key-value pairs. For a detailed breakdown of the configuration options and attributes, see Attributes of Secret manifest.
Best practices
This section involves dos and don'ts for managing a Secret.
Before deleting a Secret, ensure that any other Resources are not using it.
Command reference
A Secret has no dedicated dataos-ctl command group: manage it through the generic resource commands, scoped with -t secret.
FAQs
1. Can I update an existing Secret?
Yes, you can update a Secret by modifying its manifest file and re-applying it. However, ensure that dependent Resources are updated accordingly. To update a Secret, after making changes in the manifest file, execute the following command.
2. What happens if a Secret is deleted?
If a Secret is deleted, any Resources relying on it may lose access or experience failures. It is recommended to verify dependencies before deletion.
3. Is there a way to restore a deleted Secret?
No, deleted Secrets cannot be recovered. You must create a new Secret and update all associated resources.
4. Can we create multiple Secrets with the same name?
No, for Secrets, names must be unique. If you attempt to create a Secret with a name that already exists, the system will prevent duplication. You may need to use a different name or update the existing Secret if modifications are required.
Last updated
Was this helpful?