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:

    1. Connect to the kdb Insights Enterprise cluster on Azure.

      bash

      Copy
      az account set --subscription <SUBSCRIPTION>
                                          

    2. Get Azure cluster credentials

      bash

      Copy
      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)

      bash

      Copy
      kubectl 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:

    1. 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.

    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.

      bash

      Copy
      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.

    bash

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

Post-Upgrade (optional)

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

    bash

    Copy
    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 the 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.

    bash

    Copy
    chmod +x revert_pdb.sh
    ./revert_pdb.sh

.