Remediation
From Google Cloud Consoleโ
-
Log in to the GCP Console and navigate to the Dataproc Cluster page by visiting https://console.cloud.google.com/dataproc/clusters.
-
Select the project from the project dropdown list.
-
On the
Dataproc Clusterpage, clickCreate Clusterto create a new cluster with customer-managed encryption keys. -
On the
Create a clusterpage, perform the following steps:-
Inside the
Set up clustersection, perform the following steps:-
In the
Nametextbox, provide a name for your cluster. -
From
Location, select the location in which you want to deploy a cluster. -
Configure other settings as per your requirements.
-
-
Inside the
Configure NodesandCustomize clustersections, configure the settings as per your requirements. -
Inside the
Manage securitysection, perform the following steps:-
From
Encryption, selectCustomer-managed key. -
Select a customer-managed key from the dropdown list.
-
Ensure that the selected KMS key has the Cloud KMS CryptoKey Encrypter/Decrypter role assigned to the Dataproc Cluster service account ("serviceAccount:service-{{project-number}}@compute-system.iam.gserviceaccount.com").
-
Click
Createto create the cluster.
-
-
Once the cluster is created, migrate all workloads from the old cluster to the new cluster and delete the old cluster by performing the following steps:
-
On the
Clusterspage, select the old cluster and click onDelete cluster. -
On the
Confirm deletionwindow, click onConfirmto delete the cluster. -
Repeat the above step for other Dataproc clusters available in the selected project.
-
-
Change the project from the project dropdown list and repeat the remediation procedure for Dataproc clusters in other projects.
-
From Google Cloud CLIโ
Before creating a cluster, ensure that the selected KMS key has the Cloud KMS CryptoKey Encrypter/Decrypter role assigned to the Dataproc Cluster service account ("serviceAccount:service-{{project-number}}@compute-system.iam.gserviceaccount.com").
Run the clusters create command to create a new cluster with a customer-managed key:
gcloud dataproc clusters create {{cluster-name}} \
--region=us-central1 \
--gce-pd-kms-key={{key-resource-name}}
The above command will create a new cluster in the selected region.
Once the cluster is created, migrate all workloads from the old cluster to the new cluster and run the clusters delete command to delete the old cluster:
gcloud dataproc clusters delete {{cluster-name}} \
--region=us-central1
Repeat step 1 to create a new Dataproc cluster.
Change the project by running the following command and repeat the remediation procedure for other projects:
gcloud config set project {{project-id}}