Kubernetes Secrets Manager
OpenMetadata can use Kubernetes Secrets as its secrets manager backend, storing sensitive values (passwords, tokens, keys, etc.) as native K8s Secret objects instead of encrypted fields in the database.1. Permissions (Kubernetes RBAC)
The OpenMetadata Server needs RBAC access to Kubernetes Secret objects in the target namespace. The Python ingestion runtime only needs read access.Required verbs
| Component | Verbs |
|---|---|
| OpenMetadata Server (Java) | create, get, update, delete |
| Ingestion / Airflow (Python) | get |
Example: Role + RoleBinding (namespace-scoped)
get.
If OpenMetadata and the target secrets live in the same namespace,<om-namespace>and<secrets-namespace>are the same.
2. Update configuration
2.1 OpenMetadata Server (openmetadata.yaml)
| Parameter | Env var | Description |
|---|---|---|
secretsManager | SECRET_MANAGER | Set to kubernetes |
prefix | SECRET_MANAGER_PREFIX | Optional prefix prepended to all secret names |
tags | SECRET_MANAGER_TAGS | Key-value pairs added as K8s labels on created Secrets. Format: [key1:value1,key2:value2,...] |
namespace | OM_SM_NAMESPACE | Namespace where secrets are stored (default: default) |
kubeconfigPath | OM_SM_KUBECONFIG_PATH | Path to a kubeconfig file (out-of-cluster only) |
inCluster | OM_SM_IN_CLUSTER | Use in-cluster ServiceAccount auth (default: false) |
Choosing inCluster vs kubeconfigPath
- In-cluster (recommended for K8s deployments): set
OM_SM_IN_CLUSTER=true. Uses the pod’s ServiceAccount and the RBAC from section 1. LeavekubeconfigPathempty. - Out-of-cluster: set
OM_SM_IN_CLUSTER=falseandOM_SM_KUBECONFIG_PATHto a kubeconfig file readable by the OpenMetadata process. If the kubeconfig path is also empty, the default kubeconfig (~/.kube/config) is used.
2.2 Pipeline Service Client
In thepipelineServiceClientConfiguration section of openmetadata.yaml, set the secrets manager loader so the ingestion framework knows how to authenticate:
noop, airflow, env.
2.3 Airflow configuration (self-managed Airflow)
If you run ingestion via your own Airflow deployment, configure it to resolve K8s secrets. Option A:airflow.cfg
AIRFLOW__<SECTION>__<KEY>:
KUBERNETES_IN_CLUSTER=true and ensure Airflow’s ServiceAccount has get permissions on Secrets in the target namespace.
2.4 Non-Airflow ingestion (env loader)
When using theenv secrets manager loader (e.g., standalone ingestion containers), configure via plain environment variables:
The Pythonenvloader also auto-detects the current namespace from/var/run/secrets/kubernetes.io/serviceaccount/namespacewhen running in-cluster, falling back todefault.
3. Migrate secrets and restart services
After updating configuration, migrate existing sensitive values from database encryption to Kubernetes Secrets:- OpenMetadata Server — so it reads/writes secrets to K8s.
- Airflow / ingestion runtime — so it picks up the secrets manager settings.
4. Workflow YAML (self-managed Airflow)
If you use your own Airflow to run ingestion workflows, configure the workflow YAML:5. How secrets are stored
Naming convention
Secret names use hyphens as separators (not slashes) to comply with Kubernetes DNS naming rules:prefixcomes fromsecretsManagerConfiguration.prefixclusterNamecomes from the top-levelclusterNameinopenmetadata.yaml(default:openmetadata)- The remaining path components are derived from the entity/connection being stored
clusterName: openmetadata, no prefix):
- Only lowercase alphanumeric characters and hyphens are allowed
- Consecutive hyphens are collapsed to a single hyphen
- Leading and trailing hyphens are stripped
- Truncated to 253 characters (K8s Secret name limit)
Data format
Each secret is stored as a KubernetesSecret object with:
- A single data key:
value— containing the secret as UTF-8 bytes - Labels:
app: openmetadatamanaged-by: openmetadata-secrets-manager- Plus any custom labels from the
tagsconfiguration