Upgrade AKO from OperatorHub.io
AKO version 4.0.0 has breaking changes. Review the Breaking Changes before upgrading.
This is the procedure to upgrade AKO, installed from OperatorHub.io, to version 4.0.0.
If you are running an AKO version older than 3.4.x, you must first upgrade to the 3.4.x version before upgrading to 4.0.0:
Verify that AKO 4.0.0 is availableโ
Verify that the following command lists 4.0.0 as the current CSV version:
kubectl get packagemanifests -l catalog=operatorhubio-catalog,provider=Aerospike -o yaml | grep currentCSV:
The following should appear:
- currentCSV: aerospike-kubernetes-operator.v2.5.0
- currentCSV: aerospike-kubernetes-operator.v4.0.0
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 4.0.0. 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 4.0.0 has been created.
kubectl get installplan -n operators | grep aerospike
Sample output with an InstallPlan for version 4.0.0.
NAME CSV APPROVAL APPROVED
install-2tg7p aerospike-kubernetes-operator.v4.0.0 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
:
kubectl patch installplan -n operators --type merge --patch '{"spec":{"approved":true}}' $(kubectl get installplan -n operators | grep "aerospike-kubernetes-operator.v4.0.0" | cut -f 1 -d " ")
Verify that the Operator is upgradedโ
Run the following command:
kubectl get csv -n operators | grep aerospike
The upgrade can take some time. The CSV for version 4.0.0 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.v4.0.0 Aerospike Kubernetes Operator 4.0.0 aerospike-kubernetes-operator.v3.4.1 Succeeded
Check Operator 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 operators logs -f deployment/aerospike-operator-controller-manager manager
Sample output:
2025-02-04T07:59:36Z 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-02-04T07:59:36Z INFO controller-runtime.certwatcher Updated current TLS certificate
2025-02-04T07:59:36Z INFO setup Init aerospike-server config schemas
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "6.3.0"}
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "6.4.0"}
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "7.0.0"}
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "7.1.0"}
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "7.2.0"}
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "6.0.0"}
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "6.1.0"}
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "6.2.0"}
2025-02-04T07:59:36Z DEBUG setup Config schema added {"version": "8.0.0"}
2025-02-04T07:59:36Z INFO controller-runtime.builder Registering a mutating webhook {"GVK": "asdb.aerospike.com/v1, Kind=AerospikeCluster", "path": "/mutate-asdb-aerospike-com-v1-aerospikecluster"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Registering webhook {"path": "/mutate-asdb-aerospike-com-v1-aerospikecluster"}
2025-02-04T07:59:36Z INFO controller-runtime.builder Registering a validating webhook {"GVK": "asdb.aerospike.com/v1, Kind=AerospikeCluster", "path": "/validate-asdb-aerospike-com-v1-aerospikecluster"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Registering webhook {"path": "/validate-asdb-aerospike-com-v1-aerospikecluster"}
2025-02-04T07:59:36Z INFO controller-runtime.builder Registering a mutating webhook {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeBackupService", "path": "/mutate-asdb-aerospike-com-v1beta1-aerospikebackupservice"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Registering webhook {"path": "/mutate-asdb-aerospike-com-v1beta1-aerospikebackupservice"}
2025-02-04T07:59:36Z INFO controller-runtime.builder Registering a validating webhook {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeBackupService", "path": "/validate-asdb-aerospike-com-v1beta1-aerospikebackupservice"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Registering webhook {"path": "/validate-asdb-aerospike-com-v1beta1-aerospikebackupservice"}
2025-02-04T07:59:36Z INFO controller-runtime.builder Registering a mutating webhook {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeBackup", "path": "/mutate-asdb-aerospike-com-v1beta1-aerospikebackup"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Registering webhook {"path": "/mutate-asdb-aerospike-com-v1beta1-aerospikebackup"}
2025-02-04T07:59:36Z INFO controller-runtime.builder Registering a validating webhook {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeBackup", "path": "/validate-asdb-aerospike-com-v1beta1-aerospikebackup"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Registering webhook {"path": "/validate-asdb-aerospike-com-v1beta1-aerospikebackup"}
2025-02-04T07:59:36Z INFO controller-runtime.builder Registering a mutating webhook {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeRestore", "path": "/mutate-asdb-aerospike-com-v1beta1-aerospikerestore"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Registering webhook {"path": "/mutate-asdb-aerospike-com-v1beta1-aerospikerestore"}
2025-02-04T07:59:36Z INFO controller-runtime.builder Registering a validating webhook {"GVK": "asdb.aerospike.com/v1beta1, Kind=AerospikeRestore", "path": "/validate-asdb-aerospike-com-v1beta1-aerospikerestore"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Registering webhook {"path": "/validate-asdb-aerospike-com-v1beta1-aerospikerestore"}
2025-02-04T07:59:36Z INFO setup Adding webhook certificate watcher to manager
2025-02-04T07:59:36Z INFO setup Starting manager
2025-02-04T07:59:36Z INFO controller-runtime.metrics Starting metrics server
2025-02-04T07:59:36Z INFO setup disabling http/2
2025-02-04T07:59:36Z INFO starting server {"name": "health probe", "addr": "[::]:8081"}
2025-02-04T07:59:36Z INFO controller-runtime.webhook Starting webhook server
2025-02-04T07:59:36Z INFO setup disabling http/2
2025-02-04T07:59:36Z INFO controller-runtime.webhook Serving webhook server {"host": "", "port": 9443}