Installing the Kubernetes Secret Store CSI on OpenShift
This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.
The Kubernetes Secret Store CSI is a storage driver that allows you to mount secrets from external secret management systems like HashiCorp Vault and AWS Secrets.
It comes in two parts, the Secret Store CSI, and a Secret provider driver. This document covers just the CSI itself.
Prerequisites
- An OpenShift Cluster (ROSA, ARO, OSD, and OCP 4.x all work)
- kubectl
- helm v3
Installing the Kubernetes Secret Store CSI
-
Create an OpenShift Project to deploy the CSI into
-
Set SecurityContextConstraints to allow the CSI driver to run (otherwise the DaemonSet will not be able to create Pods)
-
Add the Secrets Store CSI Driver to your Helm Repositories
-
Update your Helm Repositories
-
Install the secrets store csi driver
-
Check that the Daemonsets is running
You should see the following
-
Add pod security profile label for CSI Driver
This is required starting in OpenShift v4.13
Uninstalling the Kubernetes Secret Store CSI
-
Delete the secrets store csi driver
-
Delete the SecurityContextConstraints
Provider Specifics
Installing the HashiCorp Vault Secret CSI Driver
The HashiCorp Vault Secret CSI Driver allows you to access secrets stored in HashiCorp Vault as Kubernetes Volumes.
Prerequisites
- An OpenShift Cluster (ROSA, ARO, OSD, and OCP 4.x all work)
- oc
- helm v3
Installing the Kubernetes Secret Store CSI
-
Create an OpenShift Project to deploy the CSI into
-
Set SecurityContextConstraints to allow the CSI driver to run (otherwise the DaemonSet will not be able to create Pods)
Azure Key Vault CSI on Azure Red Hat OpenShift
This document is adapted from the Azure Key Vault CSI Walkthrough specifically to run with Azure Red Hat OpenShift (ARO).
Prerequisites
- An ARO cluster
- The AZ CLI (logged in)
- The OC CLI (logged in)
- Helm 3.x CLI
Environment Variables
-
Run this command to set some environment variables to use throughout
Note if you created the cluster from the instructions linked above these will re-use the same environment variables, or default them to
openshiftandeastus.Installing the Kubernetes Secret Store CSI
-
Create an OpenShift Project to deploy the CSI into
-
Set SecurityContextConstraints to allow the CSI driver to run (otherwise the DaemonSet will not be able to create Pods)
-
Add the Secrets Store CSI Driver to your Helm Repositories
-
Update your Helm Repositories
Uninstalling the Kubernetes Secret Store CSI
-
Delete the secrets store csi driver
-
Delete the SecurityContextConstraints
-
-