Run the gcloud dataproc clusters create command with the following flags to create a Cloud Dataproc cluster with master and/or worker custom machine types:
The --master-machine-type custom-machine-type flag allows you to set the custom machine type used by the master VM instance in your cluster
The --worker-machine-type custom-machine-type flag allows you to set the custom machine type used by the worker VM instances in your cluster
gcloud dataproc clusters create test-cluster /
--master-machine-type custom-6-23040 /
--worker-machine-type custom-6-23040 /
Hope it helps!!
To know more about Google Cloud, join Google Cloud platform certification course today.