Is it possible to use gcloud container cluster create to create a node pool for GKE using custom machine types (https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type)?
Instead of n1-standard-1/etc, I would like to create an instance with 4 vCPU and 8 GB memory (for example).
I know this is possible in the UI, but I want to wrap this gcloud command in a script.
"gcloud container cluster create" command has a --machine-type flag.
Seems like you are trying to use custom machine types rather than standard machine types and want to use gcloud command for it like gcloud container cluster create.
This is actually supported by a beta gcloud command and you can create a cluster with custom machines by specifying the machine type as below
--machine-type “custom-{cpus}-{MiB-ram}”
For the example you have provided 4 vCPU and 8 GB memory, the command would be something like
gcloud beta container --project [project name] clusters create [cluster name] --zone [zone name] --username [username] --cluster-version "1.8.7-gke.1" --machine-type "custom-4-8192" ......
Hope this helps.