This script creates a user in Kubernetes and adds it to the specified groups.
./create-user.sh <username> <group>
# Create a user and add it to the group "developers"
./create-user.sh john developers
# Cluster roles
kubectl get clusterrolebindings -o json | jq -r '.items[] | select(.subjects[0].kind=="Group") | .metadata.name'
# Roles from all namespaces
kubectl get rolebindings -A -o json | jq -r '.items[] | select(.subjects[0].kind=="Group") | .metadata.name'