# Creating AWS ELK Cluster

### 1. Installing eksctl commandline tool

`elsctl` is a popular command-line tool to create and manage Elastic Kubernetes Service (EKS) on AWS. To install elsctl run following commands:

```bash
# Download  the latest version of eksctl commandline tool
$ curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp

# Move eksctl to your default command path
$ sudo mv /tmp/eksctl /usr/local/bin
```

{% hint style="info" %}
You can add`eksctl` to the bash completion by running:

`$ cat '. <(eksctl completion bash)' >> ~/.bashrc`
{% endhint %}

### 2. Set AWS account credentials&#x20;

Configure your aws credentials files `~/.aws/credentials`. It should define the `aws_access_key_id` and  `aws_secret_access_key`:

```scheme
[default]
aws_access_key_id=A*****s
aws_secret_access_key=tm******f
```

You can also configure the default output and region in file `~/.aws/config`

```bash
[default]
region=us-east-2
output=yaml
```

More details on aws command-line tool configuration can be found [HERE](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).

### 3. Create a new EKS Cluster&#x20;

```bash
# Create a new Kubernetes cluster using eksctl command 
$ eksctl create cluster --name jovianx-<COMPANY>-us-east-2 \
    --region us-east-2 \
    --version 1.15 \
    --managed \
    --nodegroup-name jovianx-system \
    --node-type t3.large \
    --nodes 2 \
    --nodes-min 2 \
    --nodes-max 20 \
    --asg-access \
    --external-dns-access \
    --full-ecr-access \
    --alb-ingress-access \
    --auto-kubeconfig
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jovianx.com/guides/adding-aws-elk-cluster.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
