Upgrade
This chapter details how to update an existing KeySafe 5 install to the latest version.
| When upgrading KeySafe 5 it is recommended to first update the Helm charts installed in the central platform and then update all KeySafe 5 Agent installs on host machines being managed by KeySafe 5. |
|
This page describes how to upgrade KeySafe 5 from version 1.7.0 to version 1.8.0. To upgrade from an earlier version, upgrade KeySafe 5 through the applicable intermediate releases. Versions 1.5 and 1.6 are parallel releases; therefore, you can upgrade from version 1.4 to either version 1.5 or 1.6, and then to version 1.7.0 before upgrading to version 1.8.0. For more information about upgrading to the previous version, see the Installation and Upgrade Guide for version 1.7.0. |
Upgrade the Helm Charts
Check pod status of all installed releases using helm list -A.
Example output for version 1.7.0:
$ helm list -A
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
keysafe5-alertmanager nshieldkeysafe5 1 2026-03-05 15:34:21.088573428 +0000 UTC deployed nshield-keysafe5-alertmanager-1.7 1.7
keysafe5-backend nshieldkeysafe5 1 2026-03-05 15:34:05.548334361 +0000 UTC deployed nshield-keysafe5-backend-1.7 1.7
keysafe5-istio nshieldkeysafe5 1 2026-03-05 15:34:46.687963379 +0000 UTC deployed nshield-keysafe5-istio-1.7 1.7
keysafe5-prometheus nshieldkeysafe5 1 2026-03-05 15:34:20.901035813 +0000 UTC deployed nshield-keysafe5-prometheus-1.7 1.7
keysafe5-ui nshieldkeysafe5 1 2026-03-05 15:34:21.318073454 +0000 UTC deployed nshield-keysafe5-ui-1.7 1.7
mongo-chart mongons 1 2026-03-05 15:32:28.634747553 +0000 UTC deployed mongodb-17.0.0 8.0.13
| Ensure all pods are healthy prior to performing an upgrade, unhealthy pods can prevent helm from fully completing an upgrade. |
Unpack the source
mkdir ~/keysafe5-1.8.0
tar -C ~/keysafe5-1.8.0 -xf nshield-keysafe5-1.8.0.tar.gz
cd ~/keysafe5-1.8.0/keysafe5-k8s
Load the Docker images
The Docker images need to be loaded onto a Docker registry that each node in your Kubernetes cluster can pull the images from.
See Docker Images for instructions.
Move the CA
Move the CA from the KeySafe 5 1.7.0 directory to the KeySafe 5 1.8.0 directory. Depending on your existing setup this is done in different ways. This guide includes the steps for moving internalCA and externalCA.
Both methods use the ~/keysafe5-1.8.0/keysafe5-k8s/updateinternalcerts.sh script.
externalCA
-
Create a new directory in the 1.8.0 upgrade directory. This directory needs to contain the server, the client keys, and certificates in PEM format.
mkdir ~/keysafe5-1.8.0/keysafe5-k8s/externalCAThe following files need to be included in this directory:
ca.crt The certificate of the CA that is to be trusted by the system. agentcomms.key The key to be used by the Agent Communications Server agentcomms.crt And its certificate ks5agentcomms.key The key to be used by ks5 ks5agentcomms.crt And its certificate -
Run
updateinternalcerts.shto refresh certificates:./updateinternalcerts.sh -n certs externalCAThis specific command refreshes certificates in the "certs" namespace. For more instructions refer to the help of
updateinternalcerts.sh.
internalCA
If you are using internalCA then the CA is contained within a folder called "CA" or "internalCA" of the previous installation.
-
Copy the existing folder into the current directory for the upgrade, for example:
cp -r ~/existing-ks5-install/internalCA . -
Generate the new certificates using
updateinternalcerts.sh.The following example sets the expiration date for 1 year. This command may appear to fail, but if a folder called
keysafe5-cert-updateis created then this step was successful../updateinternalcerts.sh agentcomms 365
Update MongoDB and define new database roles
-
Ensure that the MongoDB you have installed matches the prerequisites described here.
No MongoDB role changes are required.
Upgrade the KeySafe 5 backend
Retrieve the parameters used for running the Helm Chart into a file called keysafe5-backend-values.yaml:
helm -n nshieldkeysafe5 get values --all --output yaml keysafe5-backend > keysafe5-backend-values.yaml
Retrieve the parameters used for running the Prometheus and Alertmanager Helm Charts:
helm -n nshieldkeysafe5 get values --all --output yaml keysafe5-prometheus > keysafe5-prometheus-values.yaml
helm -n nshieldkeysafe5 get values --all --output yaml keysafe5-alertmanager > keysafe5-alertmanager-values.yaml
|
The values used in the Prometheus and Alertmanager charts differ from the new values in the backend chart. If you changed either chart, review the README to verify the parameters before adding them to the upgrade. |
The backend Helm chart now includes Prometheus and Alertmanager, so you can uninstall the separate keysafe5-prometheus and keysafe5-alertmanager charts.
helm uninstall keysafe5-prometheus --namespace=nshieldkeysafe5
helm uninstall keysafe5-alertmanager --namespace=nshieldkeysafe5
Upgrade the backend chart, add any extra parameters if required:
helm upgrade --install keysafe5-backend \
--namespace=nshieldkeysafe5 \
--values keysafe5-backend-values.yaml \
--set hsm_mgmt.image=$DOCKER_REGISTRY/keysafe5/hsm-mgmt:1.8.0 \
--set sw_mgmt.image=$DOCKER_REGISTRY/keysafe5/sw-mgmt:1.8.0 \
--set codesafe_mgmt.image=$DOCKER_REGISTRY/keysafe5/codesafe-mgmt:1.8.0 \
--set router.image=$DOCKER_REGISTRY/keysafe5/router:1.8.0 \
--set agent_mgmt.image=$DOCKER_REGISTRY/keysafe5/agent-mgmt:1.8.0 \
--set licence_mgmt.image=$DOCKER_REGISTRY/keysafe5/licence-mgmt:1.8.0 \
--set monitoring_mgmt.image=$DOCKER_REGISTRY/keysafe5/monitoring-mgmt:1.8.0 \
--set alertmanagerSidecar.image=$DOCKER_REGISTRY/keysafe5/alert-manager-sidecar:1.8.0 \
--set prometheus.image=$DOCKER_REGISTRY/keysafe5/prometheus:3.13.2-patch-5 \
--set alertmanager.image=$DOCKER_REGISTRY/keysafe5/alertmanager:0.34.0-patch-5 \
--set messageBus.compatibilityMode=true \
--set messageBus.URL=127.0.0.1:18084 \
--set messageBus.auth.type=tls \
--set messageBus.tls.enabled=true \
--set messageBus.tls.existingSecret=agentcomms-client-certificates \
--set messageBus.serverTLS.existingSecret=agentcomms-server-certificates \
--set prometheus.pvc=prometheus-data-keysafe5 \
--wait --timeout 3m \
helm-charts/nshield-keysafe5-backend-1.8.0.tgz
Upgrade the KeySafe 5 WebUI
Retrieve the parameters used for running the Helm Chart into a file called keysafe-ui-values.yaml:
helm -n nshieldkeysafe5 get values --all --output yaml keysafe5-ui > keysafe5-ui-values.yaml
You can change the yaml files before upgrading, although this is not required.
helm upgrade --install keysafe5-ui \
--namespace=nshieldkeysafe5 \
--set ui.image=$DOCKER_REGISTRY/keysafe5/mgmt-ui:1.8.0 \
--set ui.pullPolicy=Always \
--values keysafe5-ui-values.yaml \
--wait --timeout 3m \
helm-charts/nshield-keysafe5-ui-1.8.0.tgz
Upgrade the KeySafe 5 Istio
-
Check the version of Istio installed aligns with the software version of
istioctl. -
Enable the agent-mgmt port and certificates reference:
helm -n nshieldkeysafe5 get values --all --output yaml keysafe5-istio > keysafe5-istio-values.yaml istioctl x precheck istioctl upgrade -y \ --set values.gateways.istio-ingressgateway.ingressPorts[0].name=agent-comms \ --set values.gateways.istio-ingressgateway.ingressPorts[0].port=18084 \ --set values.gateways.istio-ingressgateway.ingressPorts[0].protocol=TCP helm upgrade --install keysafe5-istio \ --namespace=nshieldkeysafe5 \ --values keysafe5-istio-values.yaml \ --wait --timeout 3m \ helm-charts/nshield-keysafe5-istio-1.8.0.tgz
KeySafe 5 Agent Upgrade
To upgrade KeySafe 5 Agents, see Agent Upgrade.
Confirm Upgrade
To check whether the upgrades were successful, run the following commands and compare them to the expected outputs:
First check:
helm list -A
Expected output:
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
keysafe5-backend nshieldkeysafe5 1 2026-08-20 15:58:55.418621065 +0100 BST deployed nshield-keysafe5-backend-1.8.0 1.8.0
keysafe5-istio nshieldkeysafe5 1 2026-08-20 15:59:45.698553097 +0100 BST deployed nshield-keysafe5-istio-1.8.0 1.8.0
keysafe5-ui nshieldkeysafe5 1 2026-08-20 15:59:21.024473318 +0100 BST deployed nshield-keysafe5-ui-1.8.0 1.8.0
mongo-chart mongons 1 2026-08-20 15:57:08.152993243 +0100 BST deployed mongodb-17.0.0 8.0.13
Second check:
kubectl get pods -A
Expected output:
NAMESPACE NAME READY STATUS RESTARTS AGE
istio-system istio-ingressgateway-6b89d47f9d-b6gkb 1/1 Running 0 8m7s
istio-system istiod-5b4c5695cd-phrq2 1/1 Running 0 8m21s
kube-system coredns-6b4688786f-scx89 1/1 Running 0 8m21s
kube-system local-path-provisioner-6bc6568469-zx82n 1/1 Running 0 8m21s
kube-system svclb-istio-ingressgateway-68a62d67-knndm 4/4 Running 0 8m7s
mongons mongo-chart-mongodb-0 1/1 Running 0 7m13s
mongons mongo-chart-mongodb-1 1/1 Running 0 6m40s
mongons mongo-chart-mongodb-arbiter-0 1/1 Running 0 7m13s
nshieldkeysafe5 nshield-alertmanager-0 2/2 Running 0 5m26s
nshieldkeysafe5 nshield-alertmanager-1 2/2 Running 0 5m26s
nshieldkeysafe5 nshield-alertmanager-2 2/2 Running 0 5m26s
nshieldkeysafe5 nshield-keysafe5-0 7/7 Running 0 5m26s
nshieldkeysafe5 nshield-keysafe5-1 7/7 Running 0 5m26s
nshieldkeysafe5 nshield-keysafe5-2 7/7 Running 0 5m26s
nshieldkeysafe5 nshield-keysafe5-ui-5797cf59f7-h42j8 1/1 Running 0 5m
nshieldkeysafe5 nshield-keysafe5-ui-5797cf59f7-qpj48 1/1 Running 0 5m
nshieldkeysafe5 nshield-keysafe5-ui-5797cf59f7-xzgpg 1/1 Running 0 5m
nshieldkeysafe5 nshield-prometheus-0 1/1 Running 0 5m26s