Skip to content

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.

Kubernetes version can be upgraded automatically or manually, depending on what you specified during 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 v1.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:

    1. Connect to the kdb Insights Enterprise cluster on Azure

      az account set --subscription <SUBSCRIPTION>
      
    2. Get Azure cluster credentials

      az aks get-credentials --resource-group <RESOURCE GROUP> --name <KXI KUBERNETES CLUSTER NAME> --overwrite-existing
      
    3. Set the minReplicas value to 3 for the Istio HorizontalPodAutoscaler (HPA):

      kubectl patch hpa istiod -n istio-system --type=merge -p '{"spec":{"minReplicas":3}}'
      
  • To prevent the upgrade to becoming stuck, increase the Pod disruption budgets (PDBs) from 0 to 1 where applicable:

    1. Set the MODIFIED_PDBS_FILE environment variable to specify the file path where all patched PDBs will be stored. If this variable is not set, the default path of /tmp/modified_pdbs.txt will be used.

    2. Download the patch_pdb.sh script file which updates PDBs to allow pod disruption during the upgrade.

    3. Navigate to the folder where the script was downloaded, make it executable, and run it.

      chmod +x patch_pdb.sh
      ./patch_pdb.sh
      

Upgrade

  1. 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.
  2. Monitor the progress of the upgrade:

  3. Check if all nodes run the desired version

    kubectl get nodes -o json | jq -r '.items[] | "\(.status.nodeInfo.kubeletVersion) \(.metadata.name)"'
    

Post-Upgrade Tasks (optional)

  1. Set the minReplicas value back to 1 for the Istio HPA:

    kubectl patch hpa istiod -n istio-system --type=merge -p '{"spec":{"minReplicas":1}}'
    
  2. If the post-upgrade tasks are run in a different shell than the prerequisite tasks, set the MODIFIED_PDBS_FILE environment variable to same value that was used before. If this variable is not set, the default path of /tmp/modified_pdbs.txt is used.

  3. Download the revert_pdb.sh script file which reverts the PDBs to disallow pod disruption.

  4. Navigate to the folder where the script was downloaded, make it executable, and run it.

    chmod +x revert_pdb.sh
    ./revert_pdb.sh