https://rancher.com/ logo
Title
c

curved-lifeguard-39360

01/13/2023, 3:49 PM
I am working on a way to script the rollout of a rancher cluster. I have successful completed all steps, but I want to be able to create users and cloud credentials using kubectl. How can that be done?
This seems to be possible with terraform, but I am hoping to be able to do this with a yml file and a kubectl apply command.
q

quiet-arm-5251

01/13/2023, 4:33 PM
b

bulky-sunset-52084

01/13/2023, 7:03 PM
While 'users' are resources inside of the local rancher cluster they are created with a unique ID field that allows rancher to index them the UID usually starts with
u-
The rancher application itself needs to be the thing that creates them so you can technically do this by POSTing to a Rancher API endpoint. This is not a recommended approach since the API is not really designed for this use case. Really the only truly supported method at this time would be using Terraform.
c

curved-lifeguard-39360

01/13/2023, 8:48 PM
Thanks for the reply!