Prerequisites 🔗︎

Using the Pipeline web interface 🔗︎

To create a PKE cluster on AWS using the Pipeline web interface, complete the following steps. Of course, you can also do that from the command line. For other cloud providers and other available options when creating clusters, see Creating clusters.

  1. Log in to Banzai Cloud Pipeline.
  2. Select Main Menu > Create cluster > CREATE. Create a cluster in Pipeline
  3. You want to create a cluster on Amazon that uses the PKE distribution, so select Distribution > Amazon PKE. Select distribution
  4. Click GET RECOMMENDATION, select the region you want to use, then click NEXT.
  5. Select the REGION and ZONE where you want to create a cluster. Click NEXT. Set instance type and zone
  6. Add a name to the cluster, for example, demo-pke-cluster.
  7. Select the secret you have uploaded, then click NEXT.
  8. Click CREATE, then wait until the cluster is running. This usually takes at least a few minutes. You can select integrated services to install while waiting for the cluster to be created. You may need to use the refresh button to verify that the cluster is in RUNNING state.

Using the cli 🔗︎

Of course, you can achieve the same results from the CLI as well if you have installed the banzai-cli tool.

  1. Log in to Pipeline from the command line.

    banzai login --endpoint https://try.pipeline.banzai.cloud/pipeline
    
  2. If you haven’t already done that, create a secret that stores your AWS credentials. If your AWS credentials are available in the local environment, you can simply run:

    banzai secret create -t amazon -n pke-aws-secret --magic --tag ""
    
  3. Edit the following JSON file that describes the cluster to create. Note that you have to adjust the following entries:

    • location: The AWS region for the cluster, for example, eu-west-1.
    • secretName: The name of the secret you have uploaded to Pipeline.
    • zones: Change it for both the master node and the pool1 node pool (for example, eu-west-1a).
    {
        "name": "demo-cluster",
        "location": "us-west-1",
        "cloud": "amazon",
        "secretName": "<name-of-your-aws-credential>",
        "properties": {
          "pke": {
            "nodepools": [
              {
                "name": "master",
                "roles": [
                  "master"
                ],
                "provider": "amazon",
                "autoscaling": false,
                "providerConfig": {
                  "autoScalingGroup": {
                    "name": "master",
                    "zones": [
                      "us-west-1a"
                    ],
                    "instanceType": "c5.large",
                    "launchConfigurationName": "master",
                    "size": {
                      "desired": 1,
                      "min": 1,
                      "max": 1
                    }
                  }
                }
              },
              {
                "name": "pool1",
                "roles": [
                  "worker"
                ],
                "provider": "amazon",
                "autoscaling": true,
                "providerConfig": {
                  "autoScalingGroup": {
                    "name": "pool1",
                    "zones": [
                      "us-west-1a"
                    ],
                    "instanceType": "t2.medium",
                    "launchConfigurationName": "pool1",
                    "size": {
                      "desired": 3,
                      "min": 3,
                      "max": 4
                    }
                  }
                }
              }
            ],
            "kubernetes": {
              "version": "1.18.6",
              "rbac": {
                "enabled": true
              }
            },
            "cri": {
              "runtime": "containerd"
            }
          }
        }
    }
  4. When you are done editing, save the JSON into a file, and run the following command:

    banzai cluster create --file <your-json-file>
    

    Then wait until the cluster is running. You can monitor the status of the cluster using the banzai cluster get <clustername> command.

Next steps 🔗︎

Deploy some workload.