For the complete documentation index, see llms.txt. This page is also available as Markdown.

Install Self-Managed Platform in Amazon Elastic Kubernetes Service (EKS)

This guide provides detailed instructions for deploying the Harness Self-Managed Enterprise Edition on Elastic Kubernetes Service (EKS).

This guide provides step-by-step instructions for deploying the Harness Self-Managed Platform (SMP) on Amazon EKS using Helm charts.

It outlines the necessary prerequisites, configuration steps, and recommended best practices to ensure a secure and efficient deployment on EKS.

Prerequisites

  1. AWS account with necessary IAM permissions to:

    • Create EKS clusters and node groups.

    • Create and attach IAM roles and policies.

    • Provision VPC, subnets, and security groups.

    • Create and manage IAM OIDC providers and service accounts.

You can create an EKS cluster using either the AWS Management Console or the AWS CLI. However, this section focuses on using the AWS CLI and eksctl.

Ensure that both tools are installed and correctly configured before proceeding.

Step 1: Configure Your AWS Account

  1. Open your terminal and run the following command. It will prompt you to enter your AWS credentials:

    aws configure
  2. Provide your AWS credentials when prompted:

    • Access Key ID and Secret Access Key: You can access these from the AWS IAM Console.

    • Default region name: Specify the AWS region where you want to deploy the cluster (e.g., us-east-1).

    • Default output format: It's recommended to use json.

    Example:

    AWS Access Key ID [None]: YOUR_ACCESS_KEY
    AWS Secret Access Key [None]: YOUR_SECRET_KEY
    Default region name [None]: YOUR_REGION
    Default output format [None]: json
  3. To verify your configuration, run the following command:

    aws sts get-caller-identity

    If configured correctly, this command will return your AWS account information as shown below:

     {
       "UserId": "AROASIYUWQHU2SSQKRFIB:<USER>@email-domain.xyz",
       "Account": "<ACCOUNT-ID>",
       "Arn": "arn:aws:sts::156272853481:assumed-role/AWSReservedSSO_AWSPowerUserAccess_687b2d551b4cfd18/<USER>@email-domain.xyz"
     }

    For additional help, refer to the official AWS CLI configuration documentation.

Step 2: Provision a Cluster

Before creating the cluster, ensure that a VPC and Elastic IPs are available for provisioning the SMP cluster.

  1. Create a new YAML file (e.g., create-smp-cluster.yaml) using the sample configuration provided below.

    • This configuration will provision an EKS cluster for your SMP environment.

    • The configuration sets up the following:

      • A cluster named <CLUSTER-NAME> in the <YOUR-AWS-REGION> region

      • Managed node groups

      • Required IAM policies

      • Networking settings necessary for running the Harness Self-Managed Platform

    • The configuration comes with default values suitable for sandbox or testing environments. You can customize the values such as cluster name, region, tags, and CIDR ranges as needed.

  2. Run the following command to create the EKS cluster using the YAML configuration:

    This command will trigger the provisioning of the entire infrastructure defined in the YAML — including the EKS control plane, node groups, VPC, IAM, and networking.

    Replace <create-smp-cluster.yaml> with the actual filename if you named it differently.

    On success, it outputs a final message like:

Step 3: Verify the Cluster Deployment

After provisioning completes, verify the cluster was created successfully using the following commands:

  • Check the cluster status:

  • Confirm the nodes are ready:

    You should see all worker nodes in a Ready state, as shown in example below:

  • Confirm the Kubernetes context is set:

    This should return the context of your newly created EKS cluster as shown below:

    If AWS config is not set, run the following command

    If any nodes are in a NotReady state or the context is incorrect, ensure your kubectl is configured correctly and your IAM user has the necessary permissions.

Step 4: Configure the Amazon EBS CSI Driver

eksctl currently does not offer a built-in mechanism to automatically install the Amazon EBS CSI driver, which is required for provisioning Persistent Volumes (PVs) on your cluster.

To enable dynamic volume provisioning, you need to manually install and configure the EBS CSI driver using the steps below.

  1. Create a namespace for your deployment.

  2. Create an IAM role with a trust policy that allows Amazon EKS to assume the role via IAM Roles for Service Accounts (IRSA).

    GET THE OIDC ISSUER URL FOR IRSA CONFIGURATION

    Example output:

    Use the portion after https:// (i.e., oidc.eks.us-east-1.amazonaws.com/id/EXAMPLEDOCID) as the <OIDC_PROVIDER> in the trust-policy.json file.

    Begin by creating a trust-policy.json file with the following content:

    Once the trust-policy.json file is created, use the following command to create the IAM role:

  3. Attach the AmazonEBSCSIDriverPolicy to the IAM role:

  4. Use the following script to verify that your infrastructure components are functioning correctly and ensure that your Kubernetes cluster is ready to deploy Harness Self-Managed Platform (SMP):

    💡 The script checks for Kubernetes connectivity, StorageClass availability, PVC provisioning, pod scheduling, and DNS resolution.

    Save the script as k8s-health-check.sh, make it executable using:

    Then run it with:

    If all checks pass, your cluster is healthy and ready for workloads. ✅

Step 5: Install Self-Managed Platform in Amazon EKS

IMPORTANT NOTE

If you are using Kubernetes 1.3x, make sure to specify the storage class in your override file as mentioned in supported Kubernetes versions.

  1. Download the latest Helm chart from the Harness GitHub Releases page.

    • In the Assets section, locate and download the harness-<release-version>.tgz (e.g., harness-0.29.0.tgz) file.

    • Extract the downloaded file and navigate to the extracted directory.

  2. Create a file named override-new.yaml and add the following YAML content to it.

  3. Install the Helm chart using the following command.

  4. Verify that all PersistentVolumeClaims (PVCs) have been successfully created and are bound to their respective volumes in your namespace:

    Replace <HARNESS-NAMESPACE> with the namespace where your workloads are deployed.

    if the PVCs are attached properly, their status will appear as Bound, as shown below. If the status remains Pending, proceed to step 5 to manually attach the PVCs.

  5. Attach the PersistentVolumeClaims (PVCs) by patching each one with the gp2 StorageClass. While you can use other available StorageClasses (such as gp3), this installation uses gp2 by default.

    Use the following command to apply the patch in your Harness namespace.

    This command will attach the PVCs. Once completed, you can verify the attachment by repeating step 4 above.

AWS EKS can create and attach Elastic Load Balancers as a Kubernetes Resource. For more information, go to Application load balancing on Amazon EKS in the EKS documentation.

  1. Create a Load Balancer by saving the following configuration to a file named loadbalancer.yaml, and then apply it to your cluster.

    After saving the file, run the following command to create the Load Balancer in your cluster.

  2. Get the ELB URL by verifying that the LoadBalancer is provisioned and has an external IP using the command below:

    Make a note of the EXTERNAL-IP for the harness-ingress-controller. It should look like <STRING>.<YOUR-AWS-REGION>.elb.amazonaws.com.

  3. Update the override-new.yaml file by adding the loadbalancerURL and hosts fields as shown below:

  4. Upgrade the Helm deployment, applying your new ELB as the load balancer to your configuration.

  5. Once all components are healthy, you can access SMP by navigating to the sign-up UI at https://<YOUR_ELB_ADDRESS>/auth/#/signup to create your admin user.

  6. Complete to the post-install next steps.

  7. Deploy the Harness modules you want to use. For more information, go to Deploy Harness modules.

  8. Add your Harness license. For more information, go to Add a Harness license.

  9. Configure SMTP to allow for additional user invitations. For more information, go to Add SMTP configuration.

Last updated

Was this helpful?