Skip to content

Provision

What Will You Do

In this part of the self-paced exercise, you will provision an Amazon EKS cluster with an ARM Graviton based node group using a declarative cluster specification.

Important

For clusters with ARM only nodes, you need to use the minimal cluster blueprint as the blueprint or base blueprint.


Step 1: Cluster Specification

  • Open a suitable YAML editor and copy/paste the example EKS cluster specification provided below.
  • Save the file as "demo-eks-graviton.yaml" (an example)
apiVersion: infra.k8smgmt.io/v3
kind: Cluster
metadata:
  # The name of the cluster
  name: demo-eks-graviton
  # The name of the project the cluster will be created in
  project: defaultproject
spec:
  blueprintConfig:
    # The name of the blueprint the cluster will use
    name: minimal
    # The version of the blueprint the cluster will use
    version: latest
  # The name of the cloud credential that will be used to create the cluster 
  cloudCredentials: aws-cloud-credential
  config:
    # The EKS addons that will be applied to the cluster
    addons:
    - name: kube-proxy
      version: latest
    - name: vpc-cni
      version: latest
    - name: coredns
      version: latest
    managedNodeGroups:
      # The AWS AMI family type the nodes will use
    - amiFamily: AmazonLinux2
      # The desired number of nodes that can run in the node group 
      desiredCapacity: 1
      iam:
        withAddonPolicies:
          # Enables the IAM policy for cluster autoscaler
          autoScaler: true
          # Allows for full ECR (Elastic Container Registry) access. This is useful for building, for example, a CI server that needs to push images to ECR
          imageBuilder: true
      # The AWS EC2 instance type that will be used for the nodes
      instanceType: t4g.xlarge
      # The maximum number of nodes that can run in the node group
      maxSize: 1
      # The minimum number of nodes that can run in the node group
      minSize: 1
      # The name of the node group that will be created in AWS
      name: graviton
    metadata:
      # The name of the cluster
      name: demo-eks-graviton
      # The AWS region the cluster will be created in
      region: us-west-2
      # The tags that will be applied to the AWS cluster resources
      tags:
        email: user@rafay.co
        env: qa
      # The Kubernetes version that will be installed on the cluster
      version: latest
    vpc:
      # AutoAllocateIPV6 requests an IPv6 CIDR block with /56 prefix for the VPC
      autoAllocateIPv6: false
      clusterEndpoints:
        # Enables private access to the Kubernetes API server endpoints
        privateAccess: true
        # Enables public access to the Kubernetes API server endpoints
        publicAccess: false
      # The CIDR that will be used  by the cluster VPC  
      cidr: 192.168.0.0/16
  type: aws-eks

The following items in the declarative cluster specification will need to be updated/customized for your environment.

  • cluster name: "demo-eks-graviton"
  • project: "defaultproject"
  • cloud Credential: "aws-cloud-credential"
  • name: "demo-eks-graviton"
  • region: "us-west-2"

Important

Not all Graviton instance types are available in all AWS regions. Navigate to the Graviton webpage to check availability.


Step 2: Provision Cluster

  • Type the command below to provision the EKS cluster
rctl apply -f demo-eks-graviton.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.

{
  "taskset_id": "lk5opd2",
  "operations": [
    {
      "operation": "NodegroupCreation",
      "resource_name": "graviton",
      "status": "PROVISION_TASK_STATUS_PENDING"
    },
    {
      "operation": "ClusterCreation",
      "resource_name": "demo-eks-graviton",
      "status": "PROVISION_TASK_STATUS_PENDING"
    }
  ],
  "comments": "The status of the operations can be fetched using taskset_id",
  "status": "PROVISION_TASKSET_STATUS_PENDING"
}
  • Navigate to the specified "project" in your Org
  • Click on Infrastructure -> Clusters. You should see something like the following

Provisioning in Process

The provisioning process can take approximately 30 minutes to fully complete.


Step 3: Verify Cluster

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

Provisioned Cluster

  • Click on the "Node" tab and expand the attached node description

You should see something like the following

ARM Graviton Node

Specifically, look for the following "node labels". As you can see, the worker node is based on AWS Graviton "t4g.xlarge" instance type and the CPU architecture is "ARM64".

  • kubernetes.io/arch = arm64
  • node.kubernetes.io/instance-type = t4g.xlarge

Recap

As of this step, you have provisioned an Amazon EKS cluster with an ARM Graviton based node group. The cluster is also configured with a minimal cluster blueprint.

In the next step, you will configure and deploy an ARM architecture compatible workload to the newly provisioned EKS cluster.