AWS Elastic Kubernetes Service (EKS) manages your hosted Kubernetes environment, making it quick and easy to deploy and manage containerized applications without container orchestration expertise. It also eliminates the burden of ongoing operations and maintenance by provisioning, upgrading, and scaling resources on demand without taking your applications offline.
If you don’t have an AWS EKS Kubernetes cluster deployed, you’ll need to create one. If you already have one set up, you can skip to the section on deploying Step Runners on the cluster.
Create Elastic Kubernetes Service (EKS) clusters
To create an AWS EKS cluster:
Open AWS EKS: Sign in to the AWS Management Console and go to EKS.
Create a cluster: Navigate to Clusters and click Create cluster.
Enter a meaningful name.
Select a Kubernetes version.
Select a cluster IAM role with sufficient permissions.
Select a node IAM role with sufficient permissions.
Assign the cluster to a VPC.
Select multiple subnets. Exclude
e
andf
availability zones as they typically do not support EKS deployments.Click Create. The process will take around 5 minutes to complete.
Add compute nodes to EKS clusters
It is recommended to allocate at least 2 GB RAM and 2 vCPUs to nodes for Step Runners.
Navigate to node groups: When the cluster's status changes to Active, go to the cluster's Compute tab and find the Node groups section.
Add a node group: Click Add node group.
Configure the node group:
Enter a meaningful name.
Select a node IAM role with sufficient permissions.
Click Next.
(Optional) Modify the node group's default properties.
Click Next.
Select the compute subnets.
Click Next.
Review the node group's configurations and click Create. The process will take around 5 minutes to complete.
Deploy Torq Step Runners on EKS clusters
Deploying a Step Runner in AWS EKS requires using the kubectl
utility to connect to the cluster. This can either be done via the AWS CloudShell console in your browser, or through your local CLI by installing kubectl
and awscli
. It is recommended to use CloudShell as it already has awscli
and kubectl
installed with the latest versions.
If you are using an AWS user or identity profile that did not create the cluster, you will need to modify the aws-auth ConfigMap to prevent CLI login errors and allow the user to connect and use kubectl
.
To create and deploy a Step Runner in EKS:
Navigate to the Step Runner: In Torq, go to Integrations > Step Runner and click Add Instance.
Configure the Step Runner:
Enter a name that reflects the Runner's type and the deployment environment.
Enter a meaningful description to provide context.
Select Kubernetes.
Copy the install command: Click Add and copy the install command that is generated to save it for later.
Open AWS CloudShell: In the AWS Management Console, go to CloudShell.
Configure kubectl to connect to the cluster:
Run
aws sts get-caller-identity
to gather the CLI caller identity if necessary.Run
aws eks update-kubeconfig --region <region code> --name <cluster name>
to update the kubeconfig file for EKS access.Run
kubectl get svc
to test communication with the cluster. If communication is not successful, see how to modify the aws-auth ConfigMap.
Execute the install command: Once communication with the cluster is successful, paste the Runner install command from Torq. This deploys the Step Runner using the generated YAML deployment configuration file that was automatically downloaded to your device.
(Optional) For customized deployments, see advanced deployment settings.
Confirm the installation: Return to the Step Runner page in Torq and verify that the Runner's status has changed from Pending to Healthy.
Automate EKS deployment via eksctl
The eksctl
CLI tool can be used to automate the deployment and configuration of EKS clusters and node groups. This tool can be used in conjunction with awscli
(for authentication) and kubectl
to automate the full deployment. eksctl
will also create a kubeconfig file with the information required to use kubectl
with the new cluster. Like kubectl
and awscli
, eksctl
is already installed on AWS CloudShell.
To create a cluster with eksctl
:
Open AWS CloudShell: Sign in to the AWS Management Console and go to CloudShell.
Create a cluster: Run the command
eksctl create cluster --name=<cluster name> --nodes=<number of nodes> --auto-kubeconfig --region <region code>
The kubeconfig file's path will be listed in the output.