Tracy
Tracy

Reputation: 305

How to allocate image type while creating a dataporc cluster through gcloud command?

I want to assign 1.4-ubuntu18 as the image type while creating a dataproc cluster through gcloud command. I could not find the format in which i am supposed to enter it so, just used the name but this seems to be generating the below error. What should i use in place of 1.4-ubuntu18?

> --image 1.4-ubuntu18 \

ERROR: (gcloud.beta.dataproc.clusters.create) INVALID_ARGUMENT: Error validating image '1.4-ubuntu18': Parameter image must conform to the pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}

Upvotes: 2

Views: 310

Answers (1)

Dagang Wei
Dagang Wei

Reputation: 26528

The flag you are looking for is --image-version which takes an image version, e.g., 1.4-ubuntu18 or 1.4.25-debian9.

--image takes an image URI instead of image version, e.g., projects/my-project/global/images/my-image, which is usually used for custom images.

See gcloud dataproc clusters create --help for more details.

Upvotes: 1

Related Questions