More Info:
Encrypt Kubernetes secrets at rest in etcd using a master encryption key from the OCI Vault (KMS) service. Cross-tenancy access requires policies allowing the cluster to use the key.Risk Level
HighAddress
SecurityCompliance Standards
- CIS OKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Confirm cluster KMS key configuration (ClusterTenancy)
- On any machine with
ociconfigured for the ClusterTenancy, run: - For each relevant cluster, check whether
kms-key-idis set. If it is empty, secrets are not encrypted with OCI Vault.
- On any machine with
-
If
kms-key-idis unset, identify / create a Vault key (KeyTenancy)- In the KeyTenancy (or same tenancy if not cross‑tenancy), list candidate keys:
- Choose an
idof a suitable, enabled key (ocid1.key.oc1...) to use as the master encryption key.
- In the KeyTenancy (or same tenancy if not cross‑tenancy), list candidate keys:
-
Review / create cross‑tenancy policies in KeyTenancy (if using a key from another tenancy)
- In KeyTenancy, collect OCIDs for: ClusterTenancy, OKEAdminGroup, OKEAdminDynGroup, and any dynamic group representing clusters:
- In the KeyTenancy root compartment, create or review a policy with statements adapted to your OCIDs, e.g.:
- Apply via Console or, from KeyTenancy, with something like:
- In KeyTenancy, collect OCIDs for: ClusterTenancy, OKEAdminGroup, OKEAdminDynGroup, and any dynamic group representing clusters:
-
Review / create cross‑tenancy policies in ClusterTenancy
- In ClusterTenancy, gather OCIDs for: KeyTenancy, OKEAdminGroup, OKEAdminDynGroup:
- In the ClusterTenancy root compartment, create or review a policy with statements adapted to your OCIDs, e.g.:
- Apply via Console or, from ClusterTenancy, with:
- In ClusterTenancy, gather OCIDs for: KeyTenancy, OKEAdminGroup, OKEAdminDynGroup:
-
Create a new cluster with the KMS key (required if existing cluster lacks kms-key-id)
- Encryption at rest for etcd secrets must be specified at cluster creation; you cannot retroactively attach a KMS key to an existing OKE cluster.
- From any machine with
ociconfigured for ClusterTenancy, run: - Plan for migration of workloads from the old cluster to this new, encrypted cluster.
-
Verify encryption configuration (ClusterTenancy)
- After the cluster is ACTIVE, confirm that the KMS key is associated:
- The
kms-key-idfield must show the expectedocid1.key.oc1...from Vault; document this as evidence that Kubernetes secrets are configured to be encrypted at rest in etcd.
- After the cluster is ACTIVE, confirm that the KMS key is associated:
Using kubectl
Using kubectl
kubectl cannot configure encryption of Kubernetes secrets at rest in etcd on OCI; this is controlled entirely by the managed control plane and OCI KMS/Vault configuration via the OCI Console, CLI, or IaC. To address this finding, follow the guidance in the Manual Steps section for setting up Vault keys, cross-tenancy policies (if needed), and creating or updating the cluster with a
kms-key-id.Automation
Automation

