Get the gcloud create cmd for a cluster created through the GCP UI

Is there an easy way to get the gcloud container clusters create ... command details for an existing cluster? (... Command that can be used to create the exact same cluster)

Someone from my team created a cluster on GKE through the UI with specific region and machine type details, and a few other customizations I can't remember. I'll be deleting the cluster, as it was for a test. We may need to recreate it and for this, instead of running through the UI, I was hoping to document the gcloud command that can be used to create the same cluster.

I couldn't find anything on the GCP UI to help with this. We can through the docs () construct the cmd that might build the same cluster, but wanted to check if there was a better way.

2 Answers

You can create your cluster on the GUI and use the button on the bottom to generate the HTTP Rest command or the Gcloud command line. You can find this on several pages in the GUI.

GKE create cluster page

3

I recently was trying to get the gcloud command that can be used to recreate an existing cluster

I found a way to get the gcloud command with the parameters by going to your GKE-->create Cluster-->Clone an existing Cluster-->choose your Cluster and at the bottom you will have the Rest/command-line option.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like