Skip to content

Part 3: 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

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/cloudwatch/cluster"

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

Cluster Details

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

  • cluster name: "cloudwatch-cluster"
  • project: "defaultproject"
  • blueprint: "cloudwatch-blueprint"
  • blueprintversion: "v1"
  • cloud provider: "aws-cloud-credential"
  • name: "cloudwatch-cluster"
  • region: "us-west-1"
kind: Cluster
  name: cloudwatch-cluster
  project: defaultproject
  blueprint: cloudwatch-blueprint
  blueprintversion: v1
  cloudprovider: aws-cloud-credential
  cniprovider: aws-cni
  type: eks
kind: ClusterConfig
  name: cloudwatch-cluster
  region: us-west-1
  version: "1.21"
  - name: ng-1
    instanceType: t3.large
    desiredCapacity: 2
      albIngress: true
      autoScaler: true
      efs: true
      cloudWatch: true

Step 2: Provision Cluster

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

  "taskset_id": "empr728",
  "operations": [
      "operation": "NodegroupCreation",
      "resource_name": "ng-1",
      "operation": "ClusterCreation",
      "resource_name": "cloudwatch-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 a healthy 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>   22m   v1.21.5-eks-bc4871b   Ready    <none>   22m   v1.21.5-eks-bc4871b

Step 4: Verify CloudWatch Agent

Now, let us verify the CloudWatch agent resources are operational on the EKS cluster

  • Click on the kubectl link and type the following command
kubectl get pod -n amazon-cloudwatch

You should see something like the following

NAME                     READY   STATUS    RESTARTS   AGE
cloudwatch-agent-gxdr8   1/1     Running   0          10m
cloudwatch-agent-zc8pw   1/1     Running   0          10m

Step 5: Verify Metrics

Verify that the agents are connected to CloudWatch and reporting data.

  • In the AWS console, go to CloudWatch -> Insights -> Container Insights and search for the cluster "Cloudwatch-cluster"
  • View the metrics for the cluster in Amazon CloudWatch

CloudWatch Metrics


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