This guide assumes you’ve already configured your AWS organization in
Opal.

Add an EKS cluster
1. Create an IAM role
First, you need an IAM role that can be mapped a Kubernetes role that you want to make available in Opal. You can use an existing IAM role or create a new one - at the minimum, the role must have theeks:DescribeCluster permission on the EKS cluster(s) you want to manage.
If creating an IAM role, we’ve provided two ways to do this below, via AWS CLI commands or Terraform:
ACCOUNT_ID=<YOUR_AWS_MANAGEMENT_ACCOUNT_ID>IDP_ISSUER_URL=<YOUR_IDP_ISSUER_URL>OPAL_CLIENT_ID=<YOUR_OPAL_CLIENT_ID>ROLE_NAME=<YOUR_ROLE_NAME>CLUSTER_ARN=<YOUR_CLUSTER_ARN>
2. Update the aws-auth Configmap
Theaws-auth Configmap exists on every EKS cluster and is what AWS uses to map IAM roles to Kubernetes roles. To map the role you created above to a cluster-admin level role in Kubernetes, please run the following commands:
The aws-auth Configmap lets you map IAM roles to different Kubernetes roles. You’ll need to do this if you want to allow users to request access to custom access levels, like a “read-only” role. You can manually edit the Configmap by running the following command:
kubectl edit configmaps aws-auth -n kube-systemThen, you can map different roles to your IAM role ARN. See the following articles to learn how:3. Tag your EKS cluster
You’ll need to tag your EKS cluster in two ways to properly set it up for Opal. First, you must tag the cluster with any IAM roles that you set up in Step 1. For each IAM role, create a tag whose key is prefixed withopal:eks:role, and whose value is the name of the AWS IAM role. Below, we show an example of a cluster tagged with 2 IAM roles:

opal:
Access your cluster in Opal
Any EKS clusters tagged using with keyopal will be auto-imported into the “Resources” page in the “Kubernetes” folder.
Permissions to EKS clusters are session-based, meaning users must initiate temporary sessions to them. They can do so using the Connect button after clicking into an EKS cluster resource.

Use the "Connect" button to start an EKS session via Opal.

Kubernetes session credentials in Opal.

