To try the features of the Banzai Cloud Pipeline in your own environment, you will need a Kubernetes cluster managed by Pipeline. You can:
- create a cloud provider managed cluster (for example, AKS, EKS, GKE, and so on), or
- create a PKE cluster,
- or import an existing Kubernetes cluster.
The networking setup created in the Evaluate Banzai Cloud Pipeline locally guide does not allow the automatic deployment of Banzai Cloud PKE clusters (unless your machine can be accessed from the Internet), but you can import a PKE cluster running on your machine.
This procedure shows you how to launch a single-node PKE cluster with Vagrant, and import it to your local evaluation instance of Banzai Cloud Pipeline. After completing the steps, you will have an environment where you can evaluate most services of the platform.
System requirements 🔗︎
- The single-node PKE cluster requires at least 2 CPU cores and a minimum of 512 MB of memory.
This guide assumes that you already have:
- installed a local evaluation instance of Banzai Cloud Pipeline, and
- logged in using the banzai-cli tool.
Install Vagrant 🔗︎
Install VirtualBox 6.0.
Note: Install VirtualBox 6.0, newer VirtualBox versions do not support Vagrant (as of early 2020).
Tip: On macOS you can complete the first 3 steps with Homebrew using the following commands:
brew cask install virtualbox brew cask install vagrant vagrant plugin install vagrant-vbguest
Install Vagrant on your computer. Follow the Vagrant installation guide. The installer will automatically add vagrant to your system path so that it is available in terminals.
Install the vagrant-vbguest plugin:
vagrant plugin install vagrant-vbguest
Start a PKE node in Vagrant and import it into Banzai Cloud Pipeline 🔗︎
Download a Vagrant configuration file for your PKE nodes using the following command. This file will be used as a template for your virtual machines.
curl 'https://banzaicloud.com/downloads/pke/pke-centos7-single.vagrantfile' -o Vagrantfile
Start the virtual machine. This step can take several minutes to complete.
Note: The Vagrant installer automatically adds vagrant to your system path so that it is available in terminals. If it is not found, try logging out and logging back in to your system.
Download the kubeconfig configuration of the node created in the previous step. The following command saves the configuration into the pke.yaml file.
vagrant ssh node1 -c 'sudo cat /etc/kubernetes/admin.conf' > pke.yaml
If executing the command is successful, the pke.yaml file should contain a cluster configuration, for example:
apiVersion: v1 clusters: - cluster: certificate-authority-data: ...
CAUTION:If there are any additional lines before “apiVersion: v1” in the pke.yaml file, delete them.
Import the cluster into Banzai Cloud Pipeline using the following command.
banzai cluster import --no-interactive --kubeconfig=pke.yaml --name=myfirstcluster
Verify that the cluster is running with the following command:
banzai cluster get myfirstcluster
Id Name Distribution CreatorName CreatedAt Status StatusMessage 1 myfirstcluster unknown admin-example-com 2020-01-20T12:42:51Z RUNNING Cluster is running
Once the cluster is ready, you can test it with some simple commands. Use the
banzai cluster shell <commands>format. For example, you can list the nodes of the cluster using the
banzai cluster shell -- kubectl get nodes
NAME STATUS ROLES AGE VERSION node1 Ready master 63m v1.14.3
Further steps 🔗︎
If the cluster is working, complete the Deploying workload guide to learn about the basic features of the cluster.