Usage examples
How to Use Spawner CLI
Last updated
How to Use Spawner CLI
Last updated
How to use Spawner for different Cloud providers
To create a cluster. Make sure that you have completed the below steps
Added s in your config.env file in spawner folder
To easily manage configurations, you can use JSON files to provide cluster configuration and node configuration needed. You can refer to folder in the repo to find a sample cluster creation JSON files.
Here is a sample request.json for creating a cluster
Once you have the request.json ready, run the below command to create the cluster
Do keep a note of the cluster name. This will be used for the following steps to create nodes
Once you have a cluster created, you can add any type of node to the cluster based on the availability of node types in the region.
Similar to cluster, to create node pool, you can use sample JSON to add different types of nodes that are needed to be added to your cluster
NOTE: you can provide nodepool name in nodespec and the labels can be used to track costs
To add node pools, execute the below command
To get the cluster status, run the below command
Delete the existing cluster
If the cluster has the nodes attached to it, this operation will fail, you can force delete the cluster which deletes attached node and then deletes the cluster.
To force delete set the --force
or -f
This will read the existing kube-config from ~/.kube/config
and merges new cluster config to it, sets the current context as the requested cluster.
Finally, once you have the cluster created, to use the cluster from normal command,, you need to add cluster configuration to kubeconfig file. With spawner, you need not do it manually, you can just follow the below steps to do it automatically.