4

When I create a cluster on Google Cloud's Container Engine, e.g. using

gcloud container clusters create my-cluster --zone=my-zone

a node pool ("default-pool") is created as well. I don't want this default pool to be created - I want to manually create my own node pools in order to have full control over what nodes are actually being created by the cluster.

Is there any way to create a cluster in Container Engine without creating the associated default node pool?

The obvious workaround that I'm using right now is to create the cluster, add my own node pools, then delete the default node pool, but it would be better if I didn't have to go through this extra step (plus the default pool setup/deletion incurs unnecessary wait time while creating the cluster).

I'm aware of options like --machine-type, --num-nodes, etc. for gcloud container clusters create, but specifying those doesn't matter because the default node pool still gets created, which is what I'm trying to avoid.

4
  • 1
    What's wrong with the default pool? Is it not possible to configure it in the same way as one of the node pools that you want to add later? Or is it that you really want to control the name of the node pools? Jan 2, 2017 at 8:08
  • For instance, I'd really like to control the name of the default node pool since I use node pool names throughout my infra scripts. At a slightly higher level, I would like to be able to create all n node pools for my cluster in one block of commands, rather than creating 1 node pool alongside the cluster and n-1 node pools separately.
    – davewy
    Jan 20, 2017 at 23:04
  • You can create multiple node pools at once using the raw GKE API instead of using gcloud. And you can probably specify your own node names for each pool when doing so (although I haven't tried to verify this). Jan 20, 2017 at 23:57
  • I just double-checked, and you can indeed create multiple node pools with custom names when creating a cluster using the raw GKE API. Jan 21, 2017 at 7:20

3 Answers 3

3

You cannot do this using gcloud or the cloud console, but you can achieve what you are trying to do if you use the raw GKE API. In the request body you would need to specify multiple NodePool objects, putting in the name you'd like for each one. You can make programmatic calls using a client library so that you don't have to craft raw HTTP requests by hand.

2

What you are trying to achieve is not possible without using the additional steps you are following. All the clusters are created using a default node pool named “default pool” . Therefore, there is no option on the WUI or flag on gcloud that can be used for this. You might want to reply to Robert’s comment, your use case and feedback is important to improve Google’s products.

0

you have to delete default one and create your own either via terraform or any other programmatic approach.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .