Last modified March 2, 2022
'gsctl create nodepool' command reference
gsctl and the REST API are being phased out. We don't have an end-of-life date yet. However, we recommend to familiarize yourself with our Management API and the kubectl gs plugin as a future-proof replacement. We provide a migration page to help you with the transition.
gsctl create nodepool command allows to create a new node pool in a cluster.
Execute the command giving the cluster ID as a positional argument. Further options can be given as command line flags.
$ gsctl create nodepool f01r4 \ --name "General purpose m4.2xlarge 3AZ autoscaling" \ --aws-instance-type m4.2xlarge \ --num-availability-zones 3 \ --nodes-min 3 \ --nodes-max 20
You can also use the cluster’s name for identifying the cluster:
$ gsctl create nodepool "Cluster name" \ --name "General purpose m4.2xlarge 3AZ autoscaling" \ --aws-instance-type m4.2xlarge \ --num-availability-zones 3 \ --nodes-min 3 \ --nodes-max 20
To request spot instances in your node pool on AWS, you have to set the percentage of worker nodes to be using spot instances via the
--aws-spot-percentage flag. Optionally you can also define a number of workers that will be guaranteed to use on-demand instances, using the flag
--aws-on-demand-base-capacity. Here is an example with 3 on-demand instances as a base capacity and 50 percent spot instances above that:
$ gsctl create nodepool "Cluster name" \ --name "General purpose m4.2xlarge 3AZ spot" \ --aws-instance-type m4.2xlarge \ --num-availability-zones 3 \ --aws-on-demand-base-capacity 3 \ --aws-spot-percentage 50
In order to use spot instances, specify the flag, like this:
$ gsctl create nodepool f01r4 \ --name "Production" \ --azure-spot-instances
Here is how you can set a maximum hourly price in USD that a single node pool VM instance can reach before it is deallocated:
$ gsctl create nodepool f01r4 \ --name "Production" \ --azure-spot-instances \ --azure-spot-instances-max-price 0.00315
By setting the
--azure-spot-instances-max-price flag to ‘-1’, the maximum price will be set to the on-demand price of the instance.
-n, --name: Name or purpose description of the node pool. Defaults to “Unnamed node pool”.
--num-availability-zones: Number of availability zones to use. Default is
1. Use this option if you don’t care about the specific zones to use.
--availability-zones: Comma-separated list of availability zones to use, instead of setting a number. Use this option if you care about the exact zones to use.
--aws-instance-type: EC2 instance type to use for workers, e. g.
--aws-on-demand-base-capacity: Number of on-demand instances that this node pool needs to have until spot instances are used. Defaults to
--aws-spot-percentage: Percentage of spot instances used once the on-demand base capacity is fulfilled. A number of 40 would mean that 60% will be on-demand and 40% will be spot instances. Defaults to
--aws-use-alike-instance-types: Use similar instance type in your node pool. This list is maintained by Giant Swarm at the moment. Eg if you select m5.xlarge then the node pool can fall back on m4.xlarge too.
--azure-spot-instances: Whether the node pool must use spot instances or on-demand.
--azure-spot-instances-max-price: Max bid hourly price (in USD) for a single instance.
-1means on-demand price.
--azure-vm-size: VM Size to use for workers, e.g.
--nodes-min: Minimum number of worker nodes for the node pool. Defaults to
--nodes-max: Maximum number of worker nodes for the node pool. Defaults to