# Setup Kubernetes Components

## Add e6data Helm Charts Repository <a href="#step-7-add-e6data-helm-charts-repository" id="step-7-add-e6data-helm-charts-repository"></a>

The Helm chart creates a service account that will be used by the e6data cluster to leverage OIDC (OpenID Connect) authentication and obtain read permissions to access the data buckets. It also creates roles and role bindings in the EKS cluster for the e6data control plane.

These roles and role bindings define the permissions and access levels for the control plane user within the cluster, allowing it to perform specific actions and interact with resources as required by the e6data workspace.

```bash
helm repo add e6data https://e6data.github.io/helm-charts/
helm repo update
```

{% embed url="<https://github.com/e6x-labs/helm-charts>" %}
View Helm Charts on Github
{% endembed %}

## Edit `values.yaml` <a href="#step-8-edit-values.yaml" id="step-8-edit-values.yaml"></a>

1. Navigate to `./helm-charts/charts/workspace/`
2. Open the `values.yaml` file
3. Replace `<CLUSTER_IAM_ROLE_ARN>` with the RoleARN of [the role created previously](https://docs.e6data.com/product-documentation/~/revisions/W5MExJCuvHiG1ioEcgOy/setup/aws-setup/infrastructure-and-permissions-for-e6data#step-3-create-an-iam-role-for-the-e6data-engine-inlineextension).
4. Replace `<WORKSPACE_NAME>` with the name of the e6data workspace you will be creating.
5. Replace the `<NODE_POOL_NAME>`&`<NODE_CLASS_NAME>` with the name provided in the previous [node pool](https://docs.e6data.com/product-documentation/~/revisions/W5MExJCuvHiG1ioEcgOy/setup/aws-setup/prerequisite-infrastructure#b.-create-an-e6data-ec2-node-pool) and [node class](https://docs.e6data.com/product-documentation/~/revisions/W5MExJCuvHiG1ioEcgOy/setup/aws-setup/prerequisite-infrastructure#a.-create-an-e6data-ec2-node-class) creation steps.&#x20;
6. Save the edited `values.yaml` file

```yaml
cloud:
  type: "AWS"
  oidc_value: <CLUSTER_IAM_ROLE_ARN>
  control_plane_user:
    - "e6data-<WORKSPACE_NAME>-user"
karpenter:
  nodepool:
    - "<NODE_POOL_NAME>"
  nodeclass:
    - "<NODE_CLASS_NAME>"
```

{% hint style="success" %}
Please make note of the ***Workspace Name***, it will be required when creating the Workspace in the e6data Console:
{% endhint %}

## Run Helm Charts <a href="#step-9-run-helm-charts" id="step-9-run-helm-charts"></a>

{% code overflow="wrap" %}

```bash
helm upgrade -i -f /path/to/your/helm/values.yaml -n <KUBERNETES_NAMESPACE> <WORKSPACE_NAME> --version "2.0.12" e6x-labs/workspace
```

{% endcode %}

When the Helm chart finishes running, proceed to the e6data Console to create a [Workspace](https://docs.e6data.com/product-documentation/~/revisions/W5MExJCuvHiG1ioEcgOy/workspaces).
