Migrate Portworx volumes from HPCS to Key Protect
Migrate your Hyper Protect Crypto Services (HPCS) encryption for Portworx storage volumes to use IBM Key Protect (Key Protect) instead.
Before you begin
Before you migrate your Portworx encrypted volumes from Hyper Protect Crypto Services to Key Protect, complete the following steps.
- Access your Red Hat OpenShift cluster.
- Make sure you have installed the Key Protect CLI plugin.
- If you do not already have one, create a Key Protect instance to use for the migration.
- Make sure you have the Portworx HPCS to Key Protect migration script to use for migrating your volumes. This tool is included in the
hpcs-2-kp-k8s.zipfile when you request tool access. See step 1 of the migration overview for more information.
Migrating Portworx encrypted volumes
Follow the steps to migrate your Portworx encrypted volumes from Hyper Protect Crypto Services to Key Protect. These steps include running a migration script.
-
Set your IBM Cloud API key as an environment variable.
export IC_API_KEY="YOUR_API_KEY" -
Run the migration script with the required flags. Replace the placeholder values with your specific configuration details.
./hpcs_kp_px_migration_script.sh \ --region us-south \ --resource-group Default \ --hpcs-endpoint https://api.us-south.hs-crypto.cloud.ibm.com:8389/ \ --hpcs-instance-id <hpcs-instance-id> \ --hpcs-root-key-id <hpcs-root-key-id> \ --kp-endpoint https://us-south.kms.cloud.ibm.com/ \ --kp-instance-id <kp-instance-id> \ --kp-root-key-id <kp-root-key-id> \ --cluster-name my-px-cluster \ --etcd-endpoints <etcd-endpoints> \ --px-namespace kube-systemReview the table for required command parameters.
Migration script flags Flag Description --api-keyIBM Cloud API key. --regionIBM Cloud region (for example, us-south).--resource-groupIBM Cloud resource group. --hpcs-endpointHyper Protect Crypto Services key management endpoint URL. --hpcs-instance-idHyper Protect Crypto Services instance ID. --hpcs-root-key-idHyper Protect Crypto Services root key ID. --kp-endpointKey Protect endpoint URL. --kp-instance-idKey Protect instance ID. --kp-root-key-idKey Protect root key ID. --cluster-namePortworx cluster name (from pxctl statusoutput).--px-namespaceNamespace where Portworx runs on your cluster. -
After the migration script completes, update the
px-ibmKubernetes secret in theportworxnamespace to point to the Key Protect instance and root key you configured. Update the following fields:IBM_SERVICE_API_KEYIBM_INSTANCE_IDIBM_BASE_URLIBM_CUSTOMER_ROOT_KEY
-
Restart Portworx on each cluster nodes. Wait for Portworx to show as healthy on each node before proceeding to the next.
Restart Portworx on a node.
kubectl label node px/service=restart -
Validate that encrypted volumes are accessible and that new volumes use Key Protect as the key management service (KMS).