Stay organized with collections
Save and categorize content based on your preferences.
Recreate and update a cluster
You can use the gcloud command-line tool or the Dataproc API
to copy configuration from an existing cluster, update the copied configuration,
and then create a new cluster with the updated configuration.
gcloud CLI
The example instructions show updating the image
version setting in a cluster configuration. You can change the
example to update different cluster configuration settings.
Set variables.
export PROJECT=project-idexport REGION=regionexport OLD_CLUSTER=old-cluster-nameexport NEW_CLUSTER=new-cluster-nameexport NEW_IMAGE_VERSION=image-version (for example, '2.2-debian12')
Export the existing (old) cluster configuration to a YAML file.
After confirming your workloads run in the new cluster without issues,
delete the existing (old) cluster. IMPORTANT: This step deletes all
data stored in HDFS and on local disk in your cluster.
The example instructions show updating the cluster name and the image
version settings in a cluster configuration. You can change the
example variables to update different cluster configuration settings.
Set variables.
export PROJECT=project-idexport REGION=regionexport OLD_CLUSTER=old-cluster-nameexport NEW_CLUSTER=new-cluster-nameexport NEW_IMAGE_VERSION=image-version (for example, '2.2-debian12')
Export the existing (old) cluster configuration to a JSON file.
After confirming your workloads run in the new cluster without issues, delete the existing (old) cluster. IMPORTANT: This step deletes all data stored in HDFS and on local disk in your cluster.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-22 UTC."],[[["\u003cp\u003eDataproc restricts the creation of clusters with image versions older than 1.3.95, 1.4.77, 1.5.53, and 2.0.27 due to Apache Log4j security vulnerabilities, and also prevents clusters for version 0.x, 1.0.x, 1.1.x, and 1.2.x.\u003c/p\u003e\n"],["\u003cp\u003eThe latest sub-minor image versions (2.0.29, 1.5.55, and 1.4.79, or later) are advised for creating Dataproc clusters to ensure the most recent security and performance updates, while 2.0.27, 1.5.53, and 1.4.77 are strongly recommended.\u003c/p\u003e\n"],["\u003cp\u003eYou can recreate and update a Dataproc cluster's configuration, including its image version, by exporting the existing cluster's settings, updating them via tools like \u003ccode\u003esed\u003c/code\u003e or \u003ccode\u003ejq\u003c/code\u003e, and then creating a new cluster with the modified configuration.\u003c/p\u003e\n"],["\u003cp\u003eFor production environments, specifying the \u003ccode\u003emajor.minor\u003c/code\u003e image version is recommended to ensure compatibility, and the sub-minor version and OS distributions are automatically set to the latest weekly release.\u003c/p\u003e\n"],["\u003cp\u003eAfter confirming workloads function correctly on the new cluster, the old cluster should be deleted, keeping in mind this deletes all data stored in HDFS and on local disk.\u003c/p\u003e\n"]]],[],null,[]]