Skip to content

Instantly share code, notes, and snippets.

View vivek-shilimkar's full-sized avatar
🏠
Working from home

Vivek Shilimkar vivek-shilimkar

🏠
Working from home
View GitHub Profile
@superseb
superseb / create_user_and_kubeconfig_rancher2.sh
Last active November 1, 2023 18:51
Create local user and generate kubeconfig in Rancher 2 via API
#!/bin/bash
RANCHERENDPOINT=https://your_rancher_endpoint/v3
# The name of the cluster where the user needs to be added
CLUSTERNAME=your_cluster_name
# Username, password and realname of the user
USERNAME=username
PASSWORD=password
REALNAME=myrealname
# Role of the user
GLOBALROLE=user