Overview

Container Service (ACK) provides the high-performance and scalable container application management service, which enables you to manage the lifecycle of containerized applications by using Docker and Kubernetes.

This quickstart will guide you through the steps needed to set up an ACK cluster with Banzai Cloud Pipeline.

Prerequisites

  • Alibaba credentials
  • Banzai CLI tool authenticated against the Pipeline instance

Create an Alibaba secret

To access resources on Alibaba Cloud the appropriate credentials need to be registered in the Banzai Cloud Pipeline’s secret store. (The reference to this secret will be used later on instead of passing the credentials around)

Follow this guide to create Alibaba credentials

The following values are needed for the secret:

  • Access Key ID
  • Access Key Secret

You can create the secret with the following command (replace the values in the mustache brackets) :

banzai secret create <<EOF 
{
    "name": "alibaba-secret",
    "type": "alibaba",
    "values": {
      "ALIBABA_ACCESS_KEY_ID": "{{access-key-id}}",
      "ALIBABA_ACCESS_KEY_SECRET": "{{access-key-secret}}"
    }
  }
EOF
Id                                                                Name            Type    UpdatedBy  Tags
b32343e28d37e09c26d91b4271eaa8dd689b16d9f1aba07fdc73af2a27750309  alibaba-secret  alibaba  lpuskas    []

Create ACK clusters

Use the previously created secret to create the cluster

You can check the available regions and instance types at our Cloudinfo service.

To create an ACK cluster execute the following command:

banzai cluster create <<EOF
{
  "name": "ack-cluster",
  "location": "us-east-1",
  "cloud": "alibaba",
  "secretName": "alibaba-secret",
  "properties": {
    "ack": {
      "regionId": "us-east-1",
      "zoneId": "us-east-1b",
      "masterInstanceType": "ecs.g5.6xlarge",
      "masterSystemDiskCategory": "cloud_efficiency",
      "nodePools": {
        "pool1": {
          "instanceType": "ecs.t5-lc1m2.large",
          "minCount": 3,
          "maxCount": 4
        },
        "pool2": {
          "instanceType": "ecs.c5.large",
          "minCount": 1,
          "maxCount": 2
        }
      }
    }
  }
}
EOF

The command above initiates the creation of a cluster with 7 nodes:

  • 3 master nodes of type ecs.g5.6xlarge provided by the service (the number of master nodes is controlled by the ACK service, it’s always 3 for now)
  • 3 worker nodes of type ecs.t5-lc1m2.large — specified in the pool1 nodepool
  • 1 worker node of type ecs.c5.large — specified in the pool2 nodepool

The payload json provided to the command may be altered to describe the desired ACK cluster layout (e.g. more nodepools can be added with different instance types and different sizes).

Check the status of the cluster

You can check the status of the cluster creation with the following command:

banzai cluster get "ack-cluster"

Once the cluster is ready, you can try it with some simple commands. banzai cluster shell executes a shell within the context of the selected cluster. If you type a command in the shell opened, or pass it as arguments, it will be executed in a prepared environment. For example, you can list the nodes of the cluster using the original kubectl command:

banzai cluster shell --cluster-name "ack-cluster" -- kubectl get nodes

Further steps

If you are happy with the results, go on with the Deploying workload guide to learn about the basic features of a cluster.