Creating namespaces with ServiceAccount tokens

Source

CI/CD pipeline

Stimulus

Creates new Kubernetes namespace while authenticated with a ServiceAccount token

Environment

Any APPUiO Zone

Artifact

kubectl, oc or any other suitable Kubernetes client

Response

Namespace created

Response measure

Namespace is associated with the same organization as the ServiceAccount’s namespace

Rationale

To enable a Kubernetes native experience. Developers should be able to use ServiceAccount tokens to create namespaces in CI/CD pipelines as if they’re on their own Kubernetes cluster.