Programmatically create node pools and templates

Currently upgrading our 1.6 deployment in AWS to 2.1, and looking into the best way to provision Kubernetes clusters. Creating clusters through the UI using templates and node pools works great, however I’d prefer to manage these in a more “infrastructure-as-code” way. Is there a way to create/update node pool templates and node pools programmatically?

I couldn’t find anything in the Rancher CLI. I know there’s RKE, however that appears to require you list out all your nodes in a static config, which doesn’t play that well with an AWS environment where servers may come and go frequently.

Also, is there a way to take advantage of AWS autoscaling groups using Rancher 2.1/RKE? It seems at present that nodes are not part of an autoscaling group, so don’t get automatically replaced if they are terminated or become unresponsive.


1 Like

I ended up standing up my cluster using kops ( and then pulling this into Rancher as an external cluster. Works great.