# Kubernetes

{% hint style="info" %}
If you plan to upgrade your Akamas instance, please verify the upgrade path with the Akamas support team. To ensure rollback in case of upgrade failure, it is suggested to back up your studies (see section [User data backup](https://docs.akamas.io/akamas-docs/3.6/backup-and-recover-of-the-akamas-server#user-data-backup)).
{% endhint %}

The following guide uses the same chart repository and helm release names. Before starting the upgrade, you may find it helpful to look at the section [Useful Commands](#useful-commands).

## Online

Start by updating the local chart repository:

```bash
helm repo update akamas
```

### Start online upgrade

Ensure your `kubectl` configuration points to the namespace where Akamas is installed or specify it with the `--namespace` parameter. To start the upgrade to the latest version:

```bash
helm upgrade akamas akamas/akamas
```

You can specify an older chart version using the `--version` parameter. Refer to [Listing Akamas chart versions](#listing-akamas-chart-versions) for discovering the published chart versions.

If you need to specify a different `Values` file from the latest installation, start from the last one used. If you do not have it stored, it can be retrieved as specified in [Retrieving the Values file](#retrieving-the-values-file).

## Offline

Before starting the upgrade, check [Configure the registry](https://docs.akamas.io/akamas-docs/3.6/installing/kubernetes/install-akamas/offline#configure-the-registry) to add new docker images.

If you can not reach `helm.akamas.io` from the machine where the installation will be run, run the following commands from another client (see the[ installation guide](https://docs.akamas.io/akamas-docs/3.6/installing/kubernetes/install-akamas/offline#start-the-installation) for a full explanation).

```
helm repo update akamas
helm pull akamas/akamas
```

Then, you can start the upgrade in the same way as for the [Online version](#start-online-upgrade). If you are using the downloaded chart package, transfer the package and replace `akamas/akamas` with the downloaded `tgz` archive.

## Useful commands

### Listing Akamas chart versions

Akamas' versions can be listed by running the following command:

```bash
helm search repo akamas/akamas --versions
```

It is always suggested to install and upgrade to the latest chart version. The `App Version` field refers to the Akamas version. To ease the release process multiple chart versions may refer to the same `App Version`.

### Retrieving the Values file

In case you do not have access to the `Values` file used during the last installation/upgrade, you can still get it by running:

```bash
helm get values akamas -o yaml > akamas-values.yaml
```

Such a command is useful only if you need to change some of the parameters during the upgrade, otherwise the old `Values` file is kept by Helm.
