> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Access the Kubernetes cluster

> Get kubectl access to the Amazon EKS cluster that runs your Cake Platform installation.

The Cake Platform runs on an Amazon EKS cluster in your AWS account. Amazon EKS authenticates `kubectl` with AWS IAM, so you get cluster access through an IAM role or user in your account. The cluster's Terraform configuration maps that IAM identity to a Kubernetes group.

## Prerequisites

* An IAM role or user in the AWS account that hosts the cluster, such as an AWS IAM Identity Center (SSO) permission set role
* The [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) v2, signed in with that identity
* [`kubectl`](https://kubernetes.io/docs/tasks/tools/)
* Your cluster name and AWS region. Ask your Cake team if you don't have them.

## Map your IAM role to the cluster

The `aws_auth_roles` Terraform variable for your cluster lists the IAM roles that can use `kubectl`. Each entry maps a role ARN to a Kubernetes username and groups. Members of the `system:masters` group have full admin access to the cluster.

```hcl theme={null}
aws_auth_roles = [
  {
    rolearn  = "arn:aws:iam::<account-id>:role/AWSReservedSSO_<permission-set-name>_<id>"
    username = "customer-admin"
    groups   = ["system:masters"]
  },
]
```

To grant access to an IAM user instead of a role, add an entry with `userarn` to `aws_auth_users`.

> [!WARNING]
>
> For AWS IAM Identity Center roles, remove the `aws-reserved/sso.amazonaws.com/` path from the role ARN. Use `arn:aws:iam::<account-id>:role/AWSReservedSSO_<permission-set-name>_<id>`, not the full ARN that the IAM console shows. If you include the path, authentication fails.

To find the role you are signed in with, run:

```bash theme={null}
aws sts get-caller-identity --query Arn --output text
```

This command returns an assumed-role ARN such as `arn:aws:sts::<account-id>:assumed-role/AWSReservedSSO_<permission-set-name>_<id>/<session-name>`. The role name is the part between `assumed-role/` and the next `/`.

The cluster's Terraform variables are stored in AWS Secrets Manager in the secret `kflow-platform/<cluster-name>/terraform-vars`. Send your Cake team the role ARN and the access level it needs. Cake updates the variables and applies the change with Terraform.

## Configure kubectl

After Cake applies the change, add the cluster to your kubeconfig:

```bash theme={null}
aws eks update-kubeconfig --name <cluster-name> --region <region>
```

Then check that you can reach the cluster:

```bash theme={null}
kubectl get nodes
kubectl get applications -n argocd
```

The second command lists the Argo CD applications that make up your installation.

## Make changes safely

Argo CD manages the platform applications from Git. If you edit or delete a resource that Argo CD manages, Argo CD can revert your change on its next sync. Use your cluster access to inspect workloads, read logs, and [retrieve generated credentials](https://docs.cake.ai/platform/sign-in-and-credentials.md#retrieve-generated-credentials). To make lasting changes, [update your platform configuration](https://docs.cake.ai/platform/configure-the-platform.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.