Overview

This guideline describes the steps for importing an existing Kubernetes cluster into Pipeline using the Banzai CLI. Note that cluster import is EXPERIMENTAL and not all Pipeline features are supported on imported clusters as of yet. Also some of the Pipeline features have pre-requisites that the imported cluster may not fulfill thus these can’t be enabled on the imported clusters. See the limitations section for the list of unsupported Pipeline features.

Pre-requisites

  • banzai command line tool, logged in to Pipeline.
  • Kubernetes configuration of the existing cluster whose API server is reachable from Pipeline over the network.

Importing a cluster from a Kubeconfig file

Execute the following command to import an existing cluster:

banzai cluster import --name=<cluster-name> --kubeconfig=<path-to-kubeconfig>

This command imports the Kubernetes cluster of which kubeconfig was provided into Pipeline.

During the cluster import process Pipeline:

  • Installs Helm Tiller v2.12.2 into the kube-system namespace. If there is already Tiller with lower version installed than Pipeline upgrades it.
  • Creates namespaces for the components that implement the various features provided by Pipeline.

When deleting an imported cluster from Pipeline it will:

  • Remove all components deployed into namespaces created by Pipeline
  • Delete the namespaces it created

Importing your current Kubernetes context

It may be easier to import directly the Kubernetes cluster configured as your local context. Please note that this won’t work when the config does not contain the credentials, but an external authenticator command only (for example GKE clusters).

banzai cluster import -n myimportedcluster --magic

Limitations

  • In case the Kubernetes cluster has RBAC authorization enabled the service account being authenticated through the provided Kubernetes config must have cluster-edit role
  • Pipeline can not import Kubernetes cluster with kubeconfg that uses an external authenticator provider as the auth provider is not available locally to Pipeline
  • The imported cluster must run on Kubernetes version 1.10+
  • The cluster must have a default storage class
  • Imported clusters are managed only over the Kubernetes API, which means that cloud provider integrations like storage classes, load balancers or cluster autoscaling are not the responsibility of Pipeline

The following Banzai Cloud Pipeline features will only be supported for imported clusters in a future release:

  • Cluster backup feature
  • Service mesh
  • Centralized logging