Skip to content

Part 2: Provision

What Will You Do

In this part of the self-paced exercise, you will provision an Amazon EKS cluster based on a declarative cluster specification using the default blueprint

Step 1: Cluster Spec

  • Open Terminal (on macOS/Linux) or Command Prompt (Windows) and navigate to the folder where you forked the Git repository
  • Navigate to the folder "/getstarted/karpenter/cluster"

The "cluster.yaml" file contains the declarative specification for our Amazon EKS Cluster.

Cluster Details

In the cluster spec file, we define a tag with the cluster name that will automatically be applied to the AWS cluster resources during cluster creation. This tag will be used by the Karpenter provisioner to identify associated resources.

'cluster-name': 'karpenter-cluster'

The following items may need to be updated/customized if you made changes to these or used alternate names.

  • name: "karpenter-cluster"
  • project: "defaultproject"
  • cloudprovider: "aws-cloud-credential"
  • name: "karpenter-cluster"
  • region: "us-west-2"
  • cluster-name: "karpenter-cluster"
  • name: "karpenter"
  • namespace: "karpenter"
kind: Cluster
  name: karpenter-cluster
  project: defaultproject
  blueprint: default
  cloudprovider: aws-cloud-credential
  cniprovider: aws-cni
  type: eks
kind: ClusterConfig
  name: karpenter-cluster
  region: us-west-2
   'owner': 'tf'
   'cluster-name': 'karpenter-cluster'
  version: "1.21"
  withOIDC: true
    - metadata:
        name: karpenter
        namespace: karpenter
        Version: "2012-10-17"
          - Effect: Allow
            Resource: "*"
              # Write Operations
              - "ec2:CreateLaunchTemplate"
              - "ec2:CreateFleet"
              - "ec2:RunInstances"
              - "ec2:CreateTags"
              - "iam:PassRole"
              - "ec2:TerminateInstances"
              # Read Operations
              - "ec2:DescribeLaunchTemplates"
              - "ec2:DescribeInstances"
              - "ec2:DescribeSecurityGroups"
              - "ec2:DescribeSubnets"
              - "ec2:DescribeInstanceTypes"
              - "ec2:DescribeInstanceTypeOfferings"
              - "ec2:DescribeAvailabilityZones"
              - "ssm:GetParameter"
  - name: ng-1
    instanceType: t3.large
    desiredCapacity: 2
    maxSize: 4
    minSize: 1
      enableSsm: true
      albIngress: true
      efs: true

Step 2: Provision Cluster

  • Type the command below to provision the EKS cluster
rctl apply -f cluster.yaml

If there are no errors, you will be presented with a "Task ID" that you can use to check progress/status. Note that this step requires creation of infrastructure in your AWS account and can take ~20-30 minutes to complete.

Cluster: karpenter-cluster
  "taskset_id": "lk5x3d2",
  "operations": [
      "operation": "NodegroupCreation",
      "resource_name": "ng-1",
      "operation": "ClusterCreation",
      "resource_name": "karpenter-cluster",
  "comments": "The status of the operations can be fetched using taskset_id",
  • Navigate to the "defaultproject" project in your Org
  • Click on Infrastructure -> Clusters. You should see something like the following

Provisioning in Process

  • Click on the cluster name to monitor progress

Provisioning in Process

Step 3: Verify Cluster

Once provisioning is complete, you should see the cluster in the web console

Provisioned Cluster

  • Click on the kubectl link and type the following command
kubectl get nodes

You should see something like the following

NAME                                           STATUS   ROLES    AGE   VERSION    Ready    <none>   11m   v1.21.5-eks-bc4871b   Ready    <none>   11m   v1.21.5-eks-bc4871b


Congratulations! At this point, you have successfully provisioned an Amazon EKS cluster with the default blueprint in your AWS account using the RCTL CLI.