Upgrading Kubernetes on kdb Insights Enterprise on Azure Marketplace
This page explains how to upgrade your Kubernetes version, while keeping your kdb Insights Enterprise running on Azure.
The Kubernetes version can be upgraded automatically or manually, depending on what you specified during the initial kdb Insights Enterprise on Azure Marketplace deployment. Automatic Upgrade type can be checked out by accessing Kubernetes Service on Azure Portal, going to Settings > Upgrades.
Prerequisite
To perform a Kubernetes upgrade for kdb Insights Enterprise on Azure Marketplace version 1.12.0 or higher, the following manual process needs to be performed (regardless of your upgrade choice - automated or manual).
-
Check that you have sufficient CPU quota available in your Azure subscription to create a new node per each node pool.
-
The Istio ReplicaSet needs to be scaled from 1 to 3:
-
Connect to the kdb Insights Enterprise cluster on Azure.
bash
Copyaz account set --subscription <SUBSCRIPTION>
-
Get Azure cluster credentials
bash
Copyaz aks get-credentials --resource-group <RESOURCE GROUP> --name <KXI KUBERNETES CLUSTER NAME> --overwrite-existing
-
Set the minReplicas value to 3 for the Istio HorizontalPodAutoscaler (HPA)
bash
Copykubectl patch hpa istiod -n istio-system --type=merge -p '{"spec":{"minReplicas":3}}'
-
-
To prevent the upgrade from becoming stuck, increase the Pod disruption budgets (PDBs) from 0 to 1 where applicable:
-
Set the
MODIFIED_PDBS_FILE
environment variable to specify the file path where all patched PDBs are stored. If this variable is not set, the default path of/tmp/modified_pdbs.txt
is used. -
Download the patch_pdb.sh script file which updates PDBs to allow pod disruption during the upgrade.
-
Navigate to the folder where the script was downloaded, make it executable, and run it.
bash
Copychmod +x patch_pdb.sh
./patch_pdb.sh
-
Upgrade
-
If the cluster requires a manual update, do the following:
- Read the documentation: Upgrade an AKS cluster.
- Access the Azure portal.
- Navigate to kdb Insights Enterprise Azure Kubernetes Service > Settings > Cluster Configuration.
- Click Upgrade version to trigger the manual update of Kubernetes.
-
Monitor the progress of the upgrade:
- Check the node pools.
- Check the workloads.
-
Check if all nodes run the desired version.
bash
Copykubectl get nodes -o json | jq -r '.items[] | "\(.status.nodeInfo.kubeletVersion) \(.metadata.name)"'
Post-Upgrade (optional)
-
Set the
minReplicas
value back to1
for the Istio HPA:bash
Copykubectl patch hpa istiod -n istio-system --type=merge -p '{"spec":{"minReplicas":1}}'
-
If the post-upgrade tasks are run in a different shell than the prerequisite tasks, set the
MODIFIED_PDBS_FILE
environment variable to the same value that was used before. If this variable is not set, the default path of/tmp/modified_pdbs.txt
is used. -
Download the revert_pdb.sh script file which reverts the PDBs to disallow pod disruption.
-
Navigate to the folder where the script was downloaded, make it executable, and run it.
bash
Copychmod +x revert_pdb.sh
./revert_pdb.sh
.