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
@vivek-shilimkar
vivek-shilimkar / create_user_and_kubeconfig_rancher2.sh
Last active May 6, 2022 13:36 — forked from superseb/create_user_and_kubeconfig_rancher2.sh
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