# Upgrade AKO on Red Hat OpenShift

Aerospike Kubernetes Operator (AKO) is a Red Hat Marketplace certified operator. It is available through the [Red Hat certified operators catalog](https://catalog.redhat.com/software/container-stacks/detail/62339b13aacf586290afc203).

Upgrade AKO on your OpenShift cluster using the web console or command line:

-   [Web Console](#tab-panel-1206)
-   [Command Line](#tab-panel-1207)

## OpenShift Web Console

Use the following procedure to upgrade AKO installed on Red Hat OpenShift to the latest version using the web console.

### Verify version availability

1.  Launch the OpenShift web console.
    
2.  Using the `Administrator` view, navigate to `Operators` > `OperatorHub`.
    
3.  Search for `Aerospike`.
    
4.  Select the `Marketplace` version of the Aerospike Kubernetes Operator as shown in the following image.
    
     ![Select the marketplace version.](https://aerospike.com/docs/_astro/rhmp-ako-search.BRvy7kOr_Z1scVbu.png)
5.  In the Marketplace Operator page, verify that 4.1.2 is the latest version.
    
     ![Click Install.](https://aerospike.com/docs/_astro/rhmp-ako-install.DnZf-wh2_2jUhTz.png)

### Upgrade AKO

Based on the [installPlanApproval](https://olm.operatorframework.io/docs/concepts/crds/subscription/#manually-approving-upgrades-via-subscriptions) mode, the AKO upgrade is either:

-   Automatic: The default when installing AKO from Red Hat Marketplace.
-   Manual: If the Operator subscription has been edited to use Manual approval.

-   [Automatic](#tab-panel-1202)
-   [Manual](#tab-panel-1203)

The standard install procedure sets up `Automatic` upgrade approval for the operator. In this case, OpenShift automatically installs the latest version. You do not need to perform any manual steps to upgrade, only to check that the upgrade was successful.

Using the **Administrator** view, go to **Operators** > **OperatorHub**.

Search for **Aerospike**.

You should see that AKO has been upgraded to version 4.1.2, as shown in the image:

 ![Upgraded version showing.](https://aerospike.com/docs/_astro/rhmp-ako-upgraded.fOUyvEpY_Z1KXG2K.png)

Skip ahead to configuring the CLI.

If the AKO subscription is set for Manual approval, follow these steps to manually approve the upgrade.

1.  In the OpenShift web console, go to the **Administrator** view.
    
2.  Go to **Operators** > **Installed Operators**.
    
3.  Search for **Aerospike**. You will see that the new AKO version is available:
    
     ![Upgrade version available.](https://aerospike.com/docs/_astro/rhmp-ako-upgrade-available.DoTogOkL_Z1cRc8a.png)
4.  Click **Upgrade Available** to review the details of the InstallPlan. The name of the InstallPlan is generated automatically and may be different from what is displayed in the following examples.
    
     ![Upgrade version available.](https://aerospike.com/docs/_astro/rhmp-ako-upgrade-install-plan-approve.BxESrc65_Z1xcFU4.png)
5.  Click **Preview InstallPlan** to display the details of the InstallPlan:
    
     ![Upgrade version available.](https://aerospike.com/docs/_astro/rhmp-ako-upgrade-install-plan-approve.BxESrc65_Z1xcFU4.png)
6.  Click **Approve** to approve and start the upgrade. The following message appears after a successful upgrade:
    
     ![Upgrade complete.](https://aerospike.com/docs/_astro/rhmp-ako-install-complete.CeQkHIk9_Z1szBkA.png)
7.  Select **View Operator** to verify AKO details.
    
     ![Upgrade version available.](https://aerospike.com/docs/_astro/rhmp-ako-details.Cm06BCaX_ZwasnI.png) 

### Verify CLI tools

From a terminal, log in to the OpenShift cluster and ensure that the `oc` or `kubectl` CLI tool connects to the correct OpenShift cluster. Run `get pods` with either tool to make sure your pods are visible.

## OpenShift command line

Use the following procedure to upgrade AKO installed on Red Hat OpenShift to the latest version using the command line.

### Verify CLI tools

This section shows how to use `kubectl` to upgrade the AKO version. You can also use the same commands with `oc`, the OpenShift command line tool, instead of `kubectl`. The syntax of each command is the same with `oc` and `kubectl`. Run `get pods` with either command to make sure your pods are visible.

### Verify version availability

Verify that the following command lists 4.1.2 as the current CSV version:

Terminal window

```bash
kubectl get packagemanifests -l catalog=redhat-marketplace,provider=Aerospike -o yaml | grep currentCSV:
```

Expected output

Terminal window

```bash
- currentCSV: aerospike-kubernetes-operator.v2.5.0

- currentCSV: aerospike-kubernetes-operator.v4.1.2
```

### Upgrade AKO

Based on the [installPlanApproval](https://olm.operatorframework.io/docs/concepts/crds/subscription/#manually-approving-upgrades-via-subscriptions) mode, the AKO upgrade is either:

-   Automatic: The default when installing AKO from Red Hat Marketplace.
-   Manual: If the Operator subscription has been edited to use Manual approval.

-   [Automatic](#tab-panel-1204)
-   [Manual](#tab-panel-1205)

The standard install procedure sets up Automatic upgrade approval for AKO. In this case OLM automatically installs AKO version 4.1.2. You do not need to perform any manual steps to upgrade AKO.

You can skip ahead to verification.

If the OperatorHub.io subscription has been edited to use manual approval, you need to approve the upgrade as follows:

Verify that the InstallPlan for version 4.1.2 has been created.

Terminal window

```bash
kubectl get installplan -n openshift-operators | grep aerospike
```

Expected output

Sample output with an InstallPlan for version 4.1.2:

Terminal window

```bash
NAME            CSV                                    APPROVAL   APPROVED

install-2tg7p   aerospike-kubernetes-operator.v4.1.2   Manual     false
```

In this example, the upgrade is not applied since the APPROVED status is false.

To approve the upgrade, set the approved field in the InstallPlan to true:

Terminal window

```shell
kubectl patch installplan -n openshift-operators --type merge --patch '{"spec":{"approved":true}}'  $(kubectl get installplan -n openshift-operators | grep "aerospike-kubernetes-operator.v4.0.1" | cut -f 1 -d " ")
```

## Check AKO logs

After you upgrade succesfully, you can check the AKO logs.

AKO runs as two replicas by default for higher availability. Run the following command to follow the logs for the AKO pods.

```plaintext
kubectl -n openshift-operators logs -f deployments/aerospike-operator-controller-manager manager
```

Sample output:

Terminal window

```shell
2025-08-06T08:42:37Z    INFO    setup   Initializing webhook certificate watcher using provided certificates    {"webhook-cert-path": "/tmp/k8s-webhook-server/serving-certs", "webhook-cert-name": "tls.crt", "webhook-cert-key": "tls.key"}

2025-08-06T08:42:37Z    INFO    controller-runtime.certwatcher  Updated current TLS certificate

2025-08-06T08:42:37Z    INFO    setup   Init aerospike-server config schemas

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "6.0.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "6.3.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "7.1.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "8.0.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "8.1.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "6.1.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "6.2.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "6.4.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "7.0.0"}

2025-08-06T08:42:37Z    DEBUG   setup   Config schema added     {"version": "7.2.0"}

2025-08-06T08:42:37Z    INFO    controller-runtime.builder      Registering a mutating webhook  {"GVK": "asdb.aerospike.com/v1, Kind=AerospikeCluster", "path": "/mutate-asdb-aerospike-com-v1-aerospikecluster"}

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Registering webhook     {"path": "/mutate-asdb-aerospike-com-v1-aerospikecluster"}

2025-08-06T08:42:37Z    INFO    controller-runtime.builder      Registering a validating webhook        {"GVK": "asdb.aerospike.com/v1, Kind=AerospikeCluster", "path": "/validate-asdb-aerospike-com-v1-aerospikecluster"}

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Registering webhook     {"path": "/validate-asdb-aerospike-com-v1-aerospikecluster"}

2025-08-06T08:42:37Z    INFO    controller-runtime.builder      Registering a mutating webhook  {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeBackupService", "path": "/mutate-asdb-aerospike-com-v1beta1-aerospikebackupservice"}

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Registering webhook     {"path": "/mutate-asdb-aerospike-com-v1beta1-aerospikebackupservice"}

2025-08-06T08:42:37Z    INFO    controller-runtime.builder      Registering a validating webhook        {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeBackupService", "path": "/validate-asdb-aerospike-com-v1beta1-aerospikebackupservice"}

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Registering webhook     {"path": "/validate-asdb-aerospike-com-v1beta1-aerospikebackupservice"}

2025-08-06T08:42:37Z    INFO    controller-runtime.builder      Registering a mutating webhook  {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeBackup", "path": "/mutate-asdb-aerospike-com-v1beta1-aerospikebackup"}

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Registering webhook     {"path": "/mutate-asdb-aerospike-com-v1beta1-aerospikebackup"}

2025-08-06T08:42:37Z    INFO    controller-runtime.builder      Registering a validating webhook        {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeBackup", "path": "/validate-asdb-aerospike-com-v1beta1-aerospikebackup"}

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Registering webhook     {"path": "/validate-asdb-aerospike-com-v1beta1-aerospikebackup"}

2025-08-06T08:42:37Z    INFO    controller-runtime.builder      Registering a mutating webhook  {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeRestore", "path": "/mutate-asdb-aerospike-com-v1beta1-aerospikerestore"}

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Registering webhook     {"path": "/mutate-asdb-aerospike-com-v1beta1-aerospikerestore"}

2025-08-06T08:42:37Z    INFO    controller-runtime.builder      Registering a validating webhook        {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeRestore", "path": "/validate-asdb-aerospike-com-v1beta1-aerospikerestore"}

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Registering webhook     {"path": "/validate-asdb-aerospike-com-v1beta1-aerospikerestore"}

2025-08-06T08:42:37Z    INFO    setup   Adding webhook certificate watcher to manager

2025-08-06T08:42:37Z    INFO    setup   Starting manager

2025-08-06T08:42:37Z    INFO    controller-runtime.metrics      Starting metrics server

2025-08-06T08:42:37Z    INFO    starting server {"name": "health probe", "addr": "[::]:8081"}

2025-08-06T08:42:37Z    INFO    setup   disabling http/2

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Starting webhook server

2025-08-06T08:42:37Z    INFO    setup   disabling http/2

2025-08-06T08:42:37Z    INFO    controller-runtime.webhook      Serving webhook server  {"host": "", "port": 9443}
```