Skip to content

Feliksas/k8s-kubeconfig-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

.kubeconfig generator

My quick and dirty script for granting users access to a Kubernetes cluster, which takes care of all the hassle with generating a certificate, signing it with Kubernetes CA, generating a properly formatted kubeconfig, etcetera. All you gonna need is:

  • A pre-defined Kubernetes ClusterRole with needed permissions (the script uses cluster-admin by default, if nothing is specified)
  • base64 command-line tool
  • openssl command-line tool
  • kubectl tool, configured with enough permissions to create cluster roles, generate certificate requests and approving them
  • bash (Duh!) Will most probably work with any other compatible shell, but I couldn't be bothered to test that. Sorry :D

Synopsis

./gen-kubeconfig.sh <username> <certificate OU> <role_to_assign>

The last two arguments are optional.

Have fun! :)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages