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

# Amazon EKS

> Provision, import, and operate Amazon EKS clusters with Ankra - automatic IAM setup, subnets and control-plane logging, node groups, upgrades, GitOps, and AI-assisted operations.

[Amazon EKS](https://aws.amazon.com/eks/) is AWS's managed Kubernetes service. AWS runs the control plane; Ankra provisions the cluster, then manages everything on top - node groups, Kubernetes upgrades, addons, stacks, GitOps, and AI-assisted operations.

This page covers EKS specifically. For the shared concepts across all managed providers - live options, discovery/import, and day-2 API patterns - see [Managed Kubernetes](/guides/managed-kubernetes).

## Why EKS with Ankra

* **Automatic IAM setup** - Ankra creates the required IAM roles for the cluster and node groups, so you do not have to wire them by hand.
* **Bring your own network, or don't** - specify `subnet_ids` and `security_group_ids`, or let Ankra use your default VPC subnets.
* **Live pricing and options** - regions, Kubernetes versions, and EC2 instance types are fetched live with your AWS credential, including spot and autoscaling where available.

## Prerequisites

An **AWS credential** stored in Ankra (access keys or an IAM role) with permissions for **EKS**, **EC2**, and **IAM role management**. See [AWS Credentials](/platform/credentials/aws).

GitOps is optional: connect a repository at creation and Ankra commits the cluster's stack definitions to Git.

## Creating an EKS cluster

<Tabs>
  <Tab title="Portal">
    <Steps>
      <Step title="Create Cluster">
        Go to **Clusters** → **Create Cluster** and pick AWS's **Cloud Managed** action.
      </Step>

      <Step title="Credential & Region">
        Select the AWS credential and a region (for example `eu-west-1`). Regions load live from AWS.
      </Step>

      <Step title="Node Groups">
        Define one or more worker groups: name, instance type (with live pricing), count, labels, and autoscaling bounds.
      </Step>

      <Step title="Kubernetes & Networking">
        Pick a Kubernetes version or keep the default, optionally set subnets and security groups, and enable control-plane logging if you want it.
      </Step>

      <Step title="GitOps (optional) & Create">
        Optionally connect a Git repository, then create. Ankra runs EKS preflight checks, creates the IAM roles, provisions the cluster, retrieves the kubeconfig, and installs the Ankra Agent.
      </Step>
    </Steps>
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    ankra cluster managed create \
      --provider eks \
      --name my-eks-cluster \
      --credential-id <aws-credential-id> \
      --location eu-west-1 \
      --node-pool-name workers \
      --node-pool-size m5.large \
      --node-pool-count 2
    ```

    Subnets, security groups, control-plane logging, and node-group autoscaling bounds are set from the portal or the API.
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X POST https://platform.ankra.app/org/clusters/managed/eks \
      -H "Authorization: Bearer $ANKRA_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "my-eks-cluster",
        "credential_id": "<aws-credential-id>",
        "location": "eu-west-1",
        "kubernetes_version": "1.32",
        "node_pools": [
          {
            "name": "workers",
            "size": "m5.large",
            "count": 2,
            "autoscaling": {"enabled": true, "min_count": 2, "max_count": 5}
          }
        ],
        "eks": {"enable_control_plane_logging": true}
      }'
    ```
  </Tab>
</Tabs>

### EKS options

| Field                              | Description                                                            |
| ---------------------------------- | ---------------------------------------------------------------------- |
| `eks.subnet_ids`                   | Subnets to place the cluster in (defaults to your default VPC subnets) |
| `eks.security_group_ids`           | Security groups to attach                                              |
| `eks.enable_control_plane_logging` | Enable EKS control-plane logging                                       |

<Note>
  EKS creates the IAM roles for the cluster and node groups automatically and uses your default VPC subnets when `subnet_ids` is omitted. Control planes routinely take 10-15 minutes to provision; node groups follow after.
</Note>

## Day-2 operations

Node groups, upgrades, and deletion work from the CLI, portal, or API. The CLI examples use `--provider eks`:

```bash theme={null}
# scale a pool to a fixed count
ankra cluster managed node-pool scale <cluster_id> workers --provider eks --count 5

# upgrade the cluster
ankra cluster managed upgrade <cluster_id> --provider eks --version 1.32

# delete the cluster
ankra cluster managed delete <cluster_id> --provider eks
```

Autoscaling bounds are set from the portal or the `PATCH .../node-pools/{name}` endpoint. See [Managed Kubernetes - day-2 operations](/guides/managed-kubernetes#day-2-operations) for the shared mechanics.

## Importing an existing EKS cluster

Already running EKS? Discover clusters in your AWS account and adopt them into Ankra without touching them. Discovery and import run from the portal or API - see [Managed Kubernetes - importing existing clusters](/guides/managed-kubernetes#importing-existing-clusters).

## Related

* [Managed Kubernetes overview](/guides/managed-kubernetes)
* [AWS Credentials](/platform/credentials/aws)
* [Cluster settings](/platform/cluster-settings)
