Overview 🔗︎

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.

Prerequisites 🔗︎

This guide assumes that you already have:

Install Vagrant 🔗︎

  1. 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:

     ```bash
     brew cask install virtualbox
     brew cask install vagrant
     vagrant plugin install vagrant-vbguest
     ```
    
  2. 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.

  3. Install the vagrant-vbguest plugin: vagrant plugin install vagrant-vbguest

Start a PKE node in Vagrant and import it into Banzai Cloud Pipeline 🔗︎

  1. 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
    
  2. 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.

    vagrant up
    
  3. 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.
    
  4. Import the cluster into Banzai Cloud Pipeline using the following command.

    banzai cluster import --no-interactive --kubeconfig=pke.yaml --name=myfirstcluster
    
  5. Verify that the cluster is running with the following command:

    banzai cluster get myfirstcluster
    

    Expected output:

    Id  Name            Distribution  CreatorName        CreatedAt             Status   StatusMessage     
    1   myfirstcluster  unknown       admin-example-com  2020-01-20T12:42:51Z  RUNNING  Cluster is running
    
  6. 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 kubectl command:

    banzai cluster shell -- kubectl get nodes
    

    Expected output:

    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.