# Online Installation

Before starting the installation, make sure the [requirements](/akamas-docs/installing/kubernetes/prerequisites.md) are met.

## Create the configuration file

Akamas on Kubernetes is provided as a set of templates packaged in a chart archive managed by [Helm](https://helm.sh/).

To proceed with the installation, you need to create a Helm Values file, called `akamas.yaml` in this guide, containing the mandatory configuration values required to customize your application. The following template contains the minimal set required to install Akamas:

{% code title="akamas.yaml" %}

```yaml
# AWS credentials to fetch ECR images (required)
awsAccessKeyId: <AWS_ACCESS_KEY_ID>
awsSecretAccessKey: <AWS_SECRET_ACCESS_KEY>

# Akamas customer name. Must match the value in the license (required)
akamasCustomer: <CUSTOMER_NAME>

# Akamas administrator password. If not set a random password will be generated
akamasAdminPassword: <ADMIN_PASSWORD>

# The URL that will be used to access Akamas, for example 'http://akamas.kube.example.com' (required)
akamasBaseUrl: <INSTANCE_HOSTNAME>
```

{% endcode %}

You can also download the template file running the following snippet:

```bash
curl -so akamas.yaml  http://helm.akamas.io/templates/1.7.0/akamas.yaml.template
```

Replace in the file the following placeholders:

* `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`: the AWS credentials for pulling the Akamas images
* `CUSTOMER_NAME`: customer name provided with the Akamas license
* `ADMIN_PASSWORD`: initial administrator password
* `INSTANCE_HOSTNAME`: the URL that will be used to expose the Akamas installation, for example `https://akamas.k8s.example.com` when using an Ingress, or `http://localhost:9000` when using port-forwarding. Refer to [Accessing Akamas](/akamas-docs/installing/kubernetes/accessing-akamas.md) for the list of the supported access methods and a reference for any additional configuration required.

### Define Size

Akamas can be installed in three sizes Small, Medium, and Large as explained in the [cluster prerequisite](/akamas-docs/installing/kubernetes/prerequisites.md) section. By default, the chart installs the Small size. If you want to install a specific size add the following snippet to your akamas.yaml file.

**Medium**

```yaml
# Medium
airflow:
  config:
    core:
      parallelism: 102
  scheduler:
    resources:
      limits:
        cpu: 2500m
        memory: 21000Mi
      requests:
        cpu: 1000m
        memory: 21000Mi
```

**Large**

```yaml
# Large
airflow:
  config:
    core:
      parallelism: 202
  scheduler:
    resources:
      limits:
        cpu: 2500m
        memory: 28000Mi
      requests:
        cpu: 1000m
        memory: 28000Mi
telemetry:
  parallelism: 50
```

### Using custom API rate limits

In file akamas.yaml you can also add a custom configuration for API rate limiting if needed. In case, follow instructions on page [Changing default API rate limits](/akamas-docs/installing/kubernetes/install-akamas/changing-default-api-rate-limits.md) before starting Akamas

### Selecting cluster nodes

If you need to schedule Akamas pods on specific cluster nodes, follow the instructions on page [Selecting Cluster Nodes](/akamas-docs/installing/kubernetes/selecting-cluster-nodes.md).

### When using EFS storage class

If you use storage class type EFS for your pod volumes, you should add this code snippet to increase responsiveness during import/export of Akamas studies:

```yaml
license:
  migrator:
    image:
      useEfs: true
```

## Start the installation

With the configuration file you just created (and the new variables you added to override the defaults), you can start the installation with the following command:

```bash
helm upgrade --install \
  --create-namespace --namespace akamas \
  --repo http://helm.akamas.io/charts \
  --version '1.7.0' \
  -f akamas.yaml \
  akamas akamas
```

This command will create the Akamas resources within the specified namespace. You can define a different namespace by changing the argument `--namespace <your-namespace>`

An example output of a successful installation is the following:

```
Release "akamas" does not exist. Installing it now.
NAME: akamas
LAST DEPLOYED: Thu Sep 21 10:39:01 2023
NAMESPACE: akamas
STATUS: deployed
REVISION: 1
NOTES:
Akamas has been installed

NOTES:
Akamas has been installed

To get the initial password use the following command:

kubectl get secret akamas-admin-credentials -o go-template='{{ .data.password | base64decode }}'
```

## Check the installation

To monitor the application startup, run the command `kubectl get pods`. After a few minutes, the expected output should be similar to the following:

```
NAME                           READY   STATUS    RESTARTS   AGE
airflow-6ffbbf46d8-dqf8m       3/3     Running   0          5m
analyzer-67cf968b48-jhxvd      1/1     Running   0          5m
campaign-666c5db96-xvl2z       1/1     Running   0          5m
database-0                     1/1     Running   0          5m
elasticsearch-master-0         1/1     Running   0          5m
keycloak-66f748d54-7l6wb       1/1     Running   0          5m
kibana-6d86b8cbf5-6nz9v        1/1     Running   0          5m
kong-7d6fdd97cf-c2xc9          1/1     Running   0          5m
license-54ff5cc5d8-tr64l       1/1     Running   0          5m
log-5974b5c86b-4q7lj           1/1     Running   0          5m
logstash-8697dd69f8-9bkts      1/1     Running   0          5m
metrics-577fb6bf8d-j7cl2       1/1     Running   0          5m
optimizer-5b7576c6bb-96w8n     1/1     Running   0          5m
orchestrator-95c57fd45-lh4m6   1/1     Running   0          5m
store-5489dd65f4-lsk62         1/1     Running   0          5m
system-5877d4c89b-h8s6v        1/1     Running   0          5m
telemetry-8cf448bf4-x68tr      1/1     Running   0          5m
ui-7f7f4c4f44-55lv5            1/1     Running   0          5m
users-966f8f78-wv4zj           1/1     Running   0          5m
```

At this point, you should be able to access the Akamas UI using the endpoint specified in the `akamasBaseUrl`, and interact through the Akamas CLI with the path `/api`.

If you haven't already, you can update your configuration file to use a different type of service to expose Akamas' endpoints. To do so, pick from the [Accessing Akamas](/akamas-docs/installing/kubernetes/accessing-akamas.md) the configuration snippet for the service type of your choice, and add it to the `akamas.yaml` file, update the `akamasBaseUrl` value, and re-run the installation command to update your Helm release.


---

# 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.akamas.io/akamas-docs/installing/kubernetes/install-akamas/online.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.
