Skip to content

This script creates a user in Kubernetes and adds it to the specified groups.

Notifications You must be signed in to change notification settings

lpsouza/k8s-create-user

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User creator for Kubernetes

This script creates a user in Kubernetes and adds it to the specified groups.

Usage

./create-user.sh <username> <group>

Examples

# Create a user and add it to the group "developers"
./create-user.sh john developers

Get a list of groups

# 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'

About

This script creates a user in Kubernetes and adds it to the specified groups.

Topics

Resources

Stars

Watchers

Forks

Languages