Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 1.79 KB

File metadata and controls

60 lines (44 loc) · 1.79 KB

Deploy The Project Initializer

The Project Initializer is a Kubernetes Initializer that automates the creation of the Project namespaces and grants privileges to the appropriate Users.

Build

Build the Project Initializer controller:

./project-initializer/build-container

This will build and push the container image to Docker Hub.

Install

Create the Project Initializer Deployment

Deploy the project-initializer controller:

➜ kubectl apply -f project-initializer-k8s/
clusterrolebinding.rbac.authorization.k8s.io/add-on-cluster-admin created
serviceaccount/project-initializer created
deployment.apps/project-initializer created

What Happened

A ServiceAccount project-initializer was created on kube-system namespace and was given cluster-admin privileges:

➜ kubectl get clusterrolebinding -l app=project-initializer
NAME                   AGE
add-on-cluster-admin   1m
➜ kubectl describe clusterrolebinding -l app=project-initializer
Name:         add-on-cluster-admin
Labels:       app=project-initializer
Annotations:  ...
Role:
  Kind:  ClusterRole
  Name:  cluster-admin
Subjects:
  Kind            Name                 Namespace
  ----            ----                 ---------
  ServiceAccount  project-initializer  kube-system

Also a deployment project-initializer was created on kube-system namespace:

➜ kubectl logs -n kube-system -l app=project-initializer
2018/09/28 14:23:09 using in-cluster configuration
2018/09/28 14:23:09 Starting the Kubernetes project initializer...
2018/09/28 14:23:09 Initializer name set to: project.initializer.kubernetes.io

Next Steps