# Self-Managed EKS

Weaviate can be deployed on an EKS cluster using the `eksctl` command-line tool that creates and manages clusters. By the end of this document, you'll have all the necessary information to create an EKS cluster using the command line, add persistent storage to your cluster and then deploy Weaviate onto the cluster.

:::callout{intent="info" title="Prerequisites"}
- Helm installed
- The AWS CLI installed with the latest version
- `kubectl` installed
- `eksctl` installed
:::

:::accordion{title="AWS policies needed"}
Ensure that you have adequate permissions to create and interact wth an EKS cluster. The following policies should provide you the adequate permissions to create your cluster:

- eks:CreateCluster
- eks:DescribeCluster
- eks:ListClusters
- eks:UpdateClusterConfig
- eks:DeleteCluster
- iam:CreateRole
- iam:AttachRolePolicy
- iam:PutRolePolicy
- iam:GetRole
- iam:ListRolePolicies
- iam:ListAttachedRolePolicies
- ec2:DescribeSubnets
- ec2:DescribeVpcs
- ec2:DescribeSecurityGroups
- ec2:CreateSecurityGroup
- ec2:AuthorizeSecurityGroupIngress
- ec2:RevokeSecurityGroupIngress
- cloudformation:CreateStack
- cloudformation:DescribeStacks
- cloudformation:UpdateStack
- cloudformation:DeleteStack
- ec2:CreateTags
- ec2:DescribeInstances
- ec2:DescribeNetworkInterfaces
- ec2:DescribeAvailabilityZones
:::

[Embedded content embed](https://app.guideflow.com/embed/zklzyv5bop)

#### Verify your tools

Before starting, ensure that your tools are installed:

```bash
helm version
aws --version
kubectl version
eksctl version
```

### Step 1: Create the Cluster

To create your cluster, prepare a `yaml` file that with a name of your choosing (e.g. `eks-cluster.yaml`)

```yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: <your-cluster-name>
  region: <your-region>
  version: "1.31"
  
managedNodeGroups:
  - name: node-group-name
    labels: { role: worker }
    instanceType: t3.large     # Choose your instance type
    desiredCapacity: 3         # Number of nodes
    minSize: 2                 # Minimum number of nodes for autoscaling
    maxSize: 5                 # Maximum number of nodes for autoscaling
    privateNetworking: true    # Use private networking
    volumeSize: 80             # Root volume size in GB
    volumeType: gp3            # Root volume type

addons:
  - name: vpc-cni
    version: latest
    attachPolicyARNs:
      - arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
  - name: coredns
    version: latest
  - name: kube-proxy
    version: latest
  - name: aws-ebs-csi-driver
    version: latest
    wellKnownPolicies:
      ebsCSIController: true   # Enable EBS CSI driver
```

This creates an EKS cluster within your specified region with an autoscaling node group. There are 3 nodes for high availability and having autoscaling enabled allows for the cluster to dynamically adjust resources based on demand.

#### Run this command to create your EKS cluster:

```bash
eksctl create cluster -f <your-file-name.yaml>
```

#### Enable `kubectl` to interact with the newly created cluster:

```bash
aws eks --region <your-region> update-kubeconfig --name <your-cluster-name>
```

#### Verify that the cluster has been created and that you are able to interact with it:

```bash
kubectl get nodes
```

### Step 2: Add Storage Class

After creating your cluster and verifying that you can interact with it , you'll need to create a `storageclass.yaml` file:

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: <your-storageclass-name>
provisioner: ebs.csi.aws.com
parameters:
  type: gp3
  encrypted: "true"
reclaimPolicy: Retain
volumeBindingMode: Immediate
allowVolumeExpansion: true
```

After creating the storage class, apply it:

```bash
kubectl apply -f <your-storageclass-name>.yaml
```

#### Verify your storage class and has been created and applied

```bash
kubectl get sc
```

### Step 3: Add Weaviate to EKS

After adding persistent storage to your cluster, you can now deploy Weaviate into it.

#### Create a Weaviate namespace:

```bash
kubectl create namespace weaviate
```

#### Add the Weaviate Helm chart:

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

After you've added the Weaviate Helm chart, configure the `values.yaml` file before you deploy Weaviate on the cluster.

```bash
helm show values weaviate/weaviate > values.yaml
```

Before deploying Weaviate, change the `storgeclass` and ensure that you have replicas specified in your `values.yaml` file.

```yaml
storage:
  size: 32Gi
  storageClassName: "<your-storage-class-name>"
```

```yaml
replicas: 3
```

#### Deploy Weaviate on your cluster:

```bash
helm upgrade --install weaviate weaviate/weaviate \
  --namespace weaviate \
  --values values.yaml
```

#### Verify your deployment

```bash
kubectl get pods -n weaviate
```

## Further Resources

- [Persistent storage for Kubernetes](https://aws.amazon.com/blogs/storage/persistent-storage-for-kubernetes/)

## Questions and feedback

Have a question or feedback? Here's how to reach us.

::::card-grid
:::card{title="Community Forum" href="https://forum.weaviate.io/c/support" icon="messages-square"}
Ask questions and connect with other developers on our **Community forum**.
:::

:::card{title="Support" href="/guides/support-overview" icon="life-buoy"}
Weaviate Cloud user or customer? Find the right channel on the **Support page**.
:::
::::

## Related pages

- [Agents](./agents-index.md)
- [AI-assisted Weaviate code generation](./ai-assisted-vibe-coding-index.md)
- [APIs](./apis-index.md)
- [Authorization and authentication](./authorization-and-authentication-index.md)
- [Benchmarks](./benchmarks-index.md)
- [Best practices](./best-practices-index.md)
- [Client libraries](./clients-index.md)
- [Client Libraries / SDKs](./client-libraries-index.md)
- [Cloud](./cloud-index.md)
- [Cloud account management](./cloud-account-management-index.md)

# Agent Instructions

This portal answers questions programmatically. To receive a synthesized,
source-cited answer instead of crawling page by page, append the `?ask=`
query parameter to any page URL on this site:

    /guides/quickstart?ask=how+do+I+authenticate

Optional parameters:

- `&goal=<what-you-are-trying-to-do>` steers the answer toward your
  objective (e.g. `&goal=write+a+python+client`).
- `&version=<label>` scopes the answer to a mounted version when the
  portal publishes more than one.

The response is `text/markdown`: the answer followed by a `# Sources` list
of the portal pages it was grounded in. Status codes are the contract:

- `200` — the answer; `402` — the portal owner’s plan or answer credits are
  exhausted (surface this to your operator; do NOT retry); `429` — you are
  rate-limited; back off for the `Retry-After` seconds; `503` — the answer
  lane is temporarily unavailable; fall back to crawling the `.md` pages.

For the full corpus map read `llms.txt` at the site root; for the tool
surface (search + page fetch as MCP tools) see `/mcp`.
