Creating cluster with pulumi

Hello guys,

I have some problems with understanding how to automate infrastructure with pulumi & rancher2. I have created new project and I can connect to pulumi cluster but I can’t create nodes in the cluster. From my point of understanding rancher server must connect to the list of specified nodes and execure commands to pull images from docker repo and then to connect new agents to main cluster.

Problem is that: how configure rancher SSH settings?

For example: this is my pulumi configuration:

 var node1 = <ClusterRkeConfigNode>{};
  node1.roles = ['worker', 'controlplane', 'etcd'];
  node1.user = 'user1'; // registry user 
  node1.labels = { 'frontend': 'ui' };
  node1.address = '192.168.5.31';
  node1.sshKeyPath = 'path'

Translated to simple language: create new node with roles worker, etcd and controlplane on node with IP address 192.168.5.31. For connecting use username ‘user1’ and ssh key from location path.

In the near future I will have several cluster and I need to automate deployment as much as possbile. Has anyone experienced same problem? Any help or tip is welcomed.

Pulumi currently doesn’t support fetching agent creation command from API.