A very basic script to retrieve information about Projects, Namespaces, Users under Projects, and their corresponding permissions from clusters in Rancher.
- Download the all cluster's kubeconfig file from Rancher UI.
- Copy the kubeconfig file to the same directory as the
get_info.sh
script. - Run the
get_info.sh
script.
bash get_info.sh
The Output looks like this:
...
Cluster: my-cluster, Project: Default, Users: warner, Role: project-owner, Namespace: default
...