Open chrislovecnm opened 5 years ago
May I ask where you saw this gcloud command? I can't find documentation for this feature, so a link to the docs, API reference, or similar would be helpful.
I also just updated my gcloud and I get this output from running gcloud beta container node-pools create
(GA returns subset of these flags):
gcloud beta container node-pools create NAME [optional flags]
optional flags may be --accelerator | --cluster | --disk-size | --disk-type |
--enable-autorepair | --enable-autoscaling |
--enable-autoupgrade | --enable-cloud-endpoints |
--help | --image-type | --local-ssd-count |
--machine-type | --max-nodes | --max-pods-per-node |
--metadata | --metadata-from-file |
--min-cpu-platform | --min-nodes | --node-labels |
--node-taints | --node-version | --num-nodes |
--preemptible | --region | --scopes |
--service-account | --tags |
--workload-metadata-from-node | --zone
which doesn't include image or image-project. Do you mind running this gcloud command with --log-http
to show what it's calling?
Yah once I have a service account I will. Super secret ninja magic. The command was provided to me via google support.
@chrislovecnm any update on this?
It looks like there might be an existing undocumented field in the API called nodeImageConfig
under nodeConfig
that supports these image fields when imageType
is CUSTOM. I can't quite tell which API(s) support this field, but my best guess is that it is available and could be added to TF.
Community Note
Description
Add the capability to define a custom image name in TF. When defining a
node_config
add the capability to define an image name.Add the capability to define the VPC that a google image lives in for a GKE cluster. When defining a
node_config
you have able to define animage_type
. An image may live in a different vpc, from where the GKE cluster resides.New or Affected Resource(s)
Potential Terraform Configuration
References
This is a valid command in gcloud
The above command will create a node pool using the cos-gke-test machine image. This image lives in the cos-gke-test project, while the gke cluster lives in the test project.
b/351038278