Upgrade AKO on Red Hat OpenShift
Aerospike Kubernetes Operator is a Red Hat Marketplace certified operator. It is available through the Red Hat certified operators catalog.
Upgrade AKO on your OpenShift cluster using the web console or command line:
- Web Console
- Command Line
OpenShift Web Consoleโ
Use the following procedure to upgrade AKO installed on Red Hat OpenShift to the latest version using the web console.
If you are running AKO 3.0.0, you must first upgrade through the intermediate versions:
Verify that AKO 3.4.1 is availableโ
Launch the OpenShift web console.
Using the
Administrator
view, go toOperators
>OperatorHub
.Search for
Aerospike
and select theMarketplace
version of the Aerospike Kubernetes Operator:In the Marketplace Operator page, verify that
3.4.1
is the latest version.
Upgrade AKOโ
Based on the installPlanApproval 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 operator upgradeโ
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 toOperators
>OperatorHub
.Search for
Aerospike
.You should see that AKO has been upgraded to version 3.4.1, as shown below.
Skip ahead to configuring the CLI.
Manual operator upgradeโ
If the AKO subscription is set for Manual approval, follow these steps to manually approve the upgrade.
In the OpenShift web console, go to the
Administrator
view.Go to
Operators
>Installed Operators
.Search for
Aerospike
.You will see that the new AKO version is available, as shown below.
Click on
Upgrade Available
to review the details of the InstallPlan:infoThe name of the InstallPlan is generated automatically and may be different than what is displayed in the following examples.
Click on
Preview InstallPlan
to display the details of the InstallPlan:Click on
Approve
to approve and start the upgrade.The following message appears after a successful upgrade:
Select
View Operator
to verify AKO details. The following details appear:
Configure the CLIโ
From a terminal, log in to the OpenShift cluster and ensure that the oc
and kubectl
commands connect to the correct OpenShift cluster.
Check AKO logsโ
AKO runs as two replicas by default, for higher availability. Run the following command to follow the logs for the AKO pods.
kubectl -n openshift-operators logs -f deployment/aerospike-operator-controller-manager manager
Output:
2023-08-01T09:07:03Z INFO setup Init aerospike-server config schemas
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.3.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.5.2"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.6.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.5.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.2.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.4.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.0.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.7.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.0.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.7.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.1.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.1.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.5.1"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.6.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.0.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.1.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.2.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.4.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.3.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.2.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.5.3"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.5.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.3.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.3.1"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.4.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.8.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.9.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "7.0.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "7.1.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "7.2.0"}
2023-08-01T09:07:03Z INFO aerospikecluster-resource Registering mutating webhook to the webhook server
2023-08-01T09:07:03Z INFO controller-runtime.webhook Registering webhook {"path": "/mutate-asdb-aerospike-com-v1-aerospikecluster"}
2023-08-01T09:07:03Z INFO controller-runtime.builder skip registering a mutating webhook, object does not implement admission.Defaulter or WithDefaulter wasn't called {"GVK": "asdb.aerospike.com/v1, Kind=AerospikeCluster"}
2023-08-01T09:07:03Z INFO controller-runtime.builder Registering a validating webhook {"GVK": "asdb.aerospike.com/v1, Kind=AerospikeCluster", "path": "/validate-asdb-aerospike-com-v1-aerospikecluster"}
2023-08-01T09:07:03Z INFO controller-runtime.webhook Registering webhook {"path": "/validate-asdb-aerospike-com-v1-aerospikecluster"}
2023-08-01T09:07:03Z INFO setup Starting manager
2023-08-01T09:07:03Z INFO controller-runtime.webhook.webhooks Starting webhook server
2023-08-01T09:07:03Z INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "127.0.0.1:8080"}
2023-08-01T09:07:03Z INFO controller-runtime.certwatcher Updated current TLS certificate
2023-08-01T09:07:03Z INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
I0801 09:07:03.213295 1 leaderelection.go:248] attempting to acquire leader lease operators/96242fdf.aerospike.com...
2023-08-01T09:07:03Z INFO controller-runtime.webhook Serving webhook server {"host": "", "port": 9443}
2023-08-01T09:07:03Z INFO controller-runtime.certwatcher Starting certificate watcher
OpenShift Command Lineโ
Use the following procedure to upgrade AKO installed on Red Hat OpenShift to the latest version using the command line tools.
Upgrade procedureโ
If you are running AKO 3.0.0 or earlier, you must first upgrade through the intermediate versions:
The following instructions also apply to oc
, the OpenShift command line tool.
Verify that AKO 3.4.1 is availableโ
Verify that the following command lists 3.4.1 as the current CSV version:
kubectl get packagemanifests -l catalog=redhat-marketplace,provider=Aerospike -o yaml | grep currentCSV:
The following should appear:
- currentCSV: aerospike-kubernetes-operator.v2.5.0
- currentCSV: aerospike-kubernetes-operator.v3.4.1
Upgrade AKOโ
Based on the installPlanApproval mode, the upgrade of AKO can be one of
- Automatic - the default when installing AKO from OperatorHub.io.
- Manual - if the OperatorHub.io subscription has been edited to use manual approval.
Automaticโ
The standard install procedure sets up Automatic upgrade approval for AKO. In this case OLM automatically installs AKO version 3.4.1. You do not need to perform any manual steps to upgrade AKO.
You can skip ahead to verification.
Manualโ
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 3.4.1 has been created.
kubectl get installplan -n openshift-operators | grep aerospike
Sample output with an InstallPlan for version 3.4.1.
NAME CSV APPROVAL APPROVED
install-2tg7p aerospike-kubernetes-operator.v3.4.1 Manual false
install-fn297 aerospike-kubernetes-operator.v3.2.2 Manual true
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
:
kubectl patch installplan -n openshift-operators --type merge --patch '{"spec":{"approved":true}}' $(kubectl get installplan -n openshift-operators | grep "aerospike-kubernetes-operator.v3.4.1" | cut -f 1 -d " ")
Verify that the Operator is upgradedโ
Run the following command:
kubectl get csv -n openshift-operators | grep aerospike
The upgrade can take some time. The CSV for version 3.4.1 goes through the phases Pending
, Installing
,
InstallReady
and finally Succeeded
.
The sample output below illustrates a successful upgrade:
NAME DISPLAY VERSION REPLACES PHASE
aerospike-kubernetes-operator.v3.4.1 Aerospike Kubernetes Operator 3.4.1 aerospike-kubernetes-operator.v3.2.2 Succeeded
Check AKO logsโ
AKO runs as two replicas by default, for higher availability. Run the following command to follow the logs for the AKO pods.
kubectl -n openshift-operators logs -f deployment/aerospike-operator-controller-manager manager
Output:
2023-08-01T09:07:03Z INFO setup Init aerospike-server config schemas
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.3.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.5.2"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.6.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.5.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.2.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.4.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.0.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.7.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.0.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.7.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.1.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.1.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.5.1"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.6.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.0.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.1.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.2.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.4.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "6.3.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.2.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.5.3"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.5.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "5.3.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.3.1"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.4.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.8.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "4.9.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "7.0.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "7.1.0"}
2023-08-01T09:07:03Z DEBUG schema-map Config schema added {"version": "7.2.0"}
2023-08-01T09:07:03Z INFO aerospikecluster-resource Registering mutating webhook to the webhook server
2023-08-01T09:07:03Z INFO controller-runtime.webhook Registering webhook {"path": "/mutate-asdb-aerospike-com-v1-aerospikecluster"}
2023-08-01T09:07:03Z INFO controller-runtime.builder skip registering a mutating webhook, object does not implement admission.Defaulter or WithDefaulter wasn't called {"GVK": "asdb.aerospike.com/v1, Kind=AerospikeCluster"}
2023-08-01T09:07:03Z INFO controller-runtime.builder Registering a validating webhook {"GVK": "asdb.aerospike.com/v1, Kind=AerospikeCluster", "path": "/validate-asdb-aerospike-com-v1-aerospikecluster"}
2023-08-01T09:07:03Z INFO controller-runtime.webhook Registering webhook {"path": "/validate-asdb-aerospike-com-v1-aerospikecluster"}
2023-08-01T09:07:03Z INFO setup Starting manager
2023-08-01T09:07:03Z INFO controller-runtime.webhook.webhooks Starting webhook server
2023-08-01T09:07:03Z INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "127.0.0.1:8080"}
2023-08-01T09:07:03Z INFO controller-runtime.certwatcher Updated current TLS certificate
2023-08-01T09:07:03Z INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
I0801 09:07:03.213295 1 leaderelection.go:248] attempting to acquire leader lease operators/96242fdf.aerospike.com...
2023-08-01T09:07:03Z INFO controller-runtime.webhook Serving webhook server {"host": "", "port": 9443}
2023-08-01T09:07:03Z INFO controller-runtime.certwatcher Starting certificate watcher