Quick start cluster setup

Instructions for quickly setting up an EKS cluster

This page provides instructions for setting up an Amazon EKS cluster that supports NannyML Cloud. It is intended as a quick start when you just want to get going. For configuration options and explanation please consult the AWS documentation.

You will need to have AWS API credentials configured. The account used needs permissions to manage EKS clusters and IAM roles.

Install eksctl

# for ARM systems, set ARCH to: `arm64`, `armv6` or `armv7`
ARCH=amd64
PLATFORM=$(uname -s)_$ARCH

curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"

# (Optional) Verify checksum
curl -sL "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --check

tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz

sudo mv /tmp/eksctl /usr/local/bin

Define cluster name

CLUSTER_NAME=nannyml-cloud-demo

Create cluster with EBS CSI driver

eksctl create cluster --name --version=1.29 $CLUSTER_NAME && \
eksctl utils associate-iam-oidc-provider --cluster $CLUSTER_NAME --approve && \
eksctl create iamserviceaccount \
    --name ebs-csi-controller-sa \
    --namespace kube-system \
    --cluster $CLUSTER_NAME \
    --role-name AmazonEKS_EBS_CSI_DriverRole \
    --role-only \
    --attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \
    --approve && \
eksctl create addon \
    --name aws-ebs-csi-driver \
    --cluster $CLUSTER_NAME \
    --service-account-role-arn arn:aws:iam::$(aws sts get-caller-identity --query "Account" --output text):role/AmazonEKS_EBS_CSI_DriverRole \
    --force

Delete cluster

At some point you may decide to delete your cluster, e.g. after initial testing you want to create a cluster in your AWS organisation account.

Deleting a cluster containing a NannyML Cloud instance will cause models and configuration to be lost.

eksctl delete cluster --name $CLUSTER_NAME

This deletes all cluster resources, including EC2 instances and IAM roles associated with cluster. However, it does not delete Elastic Block Store (EBS) volumes. If desired, you can delete these manually from the AWS Console.

Last updated