Skip to content

Elastic Kubernetes Service (EKS)

Create Cluster

- Non-GPU cluster

Terminal window
eksctl create cluster \
--name=cpu-cluster \
--region=ap-southeast-1 \
--version=1.28 \
--nodegroup-name=cpu-workers \
--node-type=t3.medium \
--nodes=2 \
--nodes-min=2 \
--nodes-max=3

- GPU cluster

Terminal window
eksctl create cluster \
--name=gpu-cluster \
--region=ap-southeast-1 \
--version=1.28 \
--nodegroup-name=gpu-workers \
--node-type=g4dn.xlarge \
--nodes=2 \
--nodes-min=2 \
--nodes-max=3

- Create cluster using .yml

Terminal window
eksctl create cluster -f cluster_config.yaml
cluster-config.yaml
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: gpu-clstr
region: ap-southeast-1
version: "1.30"
# iam:
# withOIDC: true
managedNodeGroups:
- name: cpu-ng
instanceType: t3.medium
minSize: 1
maxSize: 2
amiFamily: AmazonLinux2
labels: { role: cpu-general }
- name: gpu-ng
instanceType: g4dn.xlarge
minSize: 1
maxSize: 2
amiFamily: Bottlerocket
taints:
- key: nvidia.com/gpu
value: present
effect: NoSchedule
labels: { role: gpu-worker }
addons:
- name: vpc-cni
- name: coredns
- name: kube-proxy

Delete cluster

Terminal window
eksctl delete cluster --name=gpu-cluster --region=ap-southeast-1