Learn KOP - Provision EKS Cluster with AWS Fargate - Rafay Product Documentation

Provision

What Will You Do

In this part, you will provision an Amazon EKS cluster with AWS Fargate profiles.

Update Cluster Specification

Cluster Spec Explained

In the example cluster spec provided,

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

apiVersion: infra.k8smgmt.io/v3
kind: Cluster
metadata:
  name: fargate-demo
  project: defaultproject
spec:
  blueprintConfig:
    name: minimal
    version: latest
  cloudCredentials: aws-cc
  config:
    fargateProfiles:
    - name: fp-dev
      selectors:
      - namespace: dev
    - name: fp-demo
      selectors:
      - labels:
          env: demo
        namespace:
    addons:
    - name: kube-proxy
      version: latest
    - name: vpc-cni
      version: latest
    - name: coredns
      version: latest
    managedNodeGroups:
    - amiFamily: AmazonLinux2
      desiredCapacity: 1
      instanceType: t3.large
      maxSize: 3
      minSize: 1
      name: managed
    metadata:
      name: fargate-demo
      region: us-west-2
      tags:
        email: user@rafay.co
        env: qa
      version: latest
    vpc:
      autoAllocateIPv6: false
      clusterEndpoints:
        privateAccess: true
        publicAccess: false
      cidr: 192.168.0.0/16
  type: aws-eks

Provision EKS Cluster

rctl apply -f fargate-demo.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": "managed",
      "status": "PROVISION_TASK_STATUS_PENDING"
    },
    {
      "operation": "ClusterCreation",
      "resource_name": "fargate-demo",
      "status": "PROVISION_TASK_STATUS_PENDING"
    }
  ],
  "comments": "The status of the operations can be fetched using taskset_id",
  "status": "PROVISION_TASKSET_STATUS_PENDING"
}

The provisioning process can take approximately 30 minutes to fully complete. Once provisioning is complete, you should see a healthy cluster in the project in your Org