Skip to content

charlesdunbar/k8s-provisioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K8S-Provisioner

This script does two things right now:

  1. create a namespace
  2. add a rolebinding to that namespace
    1. The rolebinding is the "admin" clusterrolebinding

This allows for quick provisioning of new users to their own dedicated namespaces. In the future it may include additional functionality such as adding an entire ldap group at once to a namespace.

The script expects you to have a working ~/.kube/config, which you can verify by checking the output of kubectl get nodes.

Install

Install glide (either curl https://glide.sh/get | sh or brew install glide), and run glide install

Use

go run provision.go -n namespace_to_create -u username

If using GKE, username will likely be in [email protected] format.

Why

This script is a simple golang program that I'm using as an excuse to learn go, and work with the kuberentes go-client library.

About

Script used to provision some kubernetes resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages