---
title: Prepare for the upgrade
url: https://documentation.cluedin.net/operate/upgrade/prepare-for-the-upgrade
content_type: how-to
section: Deploy & operate > Upgrade
---

# Prepare for the upgrade

> how-to: Steps to accomplish one task.

Before upgrading CluedIn, it’s important to make sure your environment is ready. Proper preparation helps reduce downtime, avoid data loss, and ensures a smooth transition to the new version. This page covers stage 2 of the [CluedIn upgrade process](https://documentation.cluedin.net/operate/upgrade/guide.md). It walks you through the key steps to check and complete before starting the upgrade process.

## Get access to CluedIn application

Before starting an upgrade, it is best practice to open the CluedIn UI and confirm that all services are running as expected. If you don’t have direct access, make sure that someone who does is available to assist throughout the upgrade process. For instructions, see [Check CluedIn UI](https://documentation.cluedin.net/operate/upgrade/common-upgrade-operations.md#check-cluedin-ui).

## Prepare the kubeconfig file

You need a valid [kubeconfig file](https://documentation.cluedin.net/operate/upgrade/required-tools.md#kubeconfig-file) to connect [Helm](https://documentation.cluedin.net/operate/upgrade/required-tools.md#helm) and [kubectl](https://documentation.cluedin.net/operate/upgrade/required-tools.md#kubectl) to the CluedIn [Azure Kubernetes Service (AKS)](https://documentation.cluedin.net/operate/upgrade/required-tools.md#azure-kubernetes-service) cluster.

**To prepare the kubeconfig file**

1. Contact your Azure administrator and ask them to provide the kubeconfig file to you.

    Your administrator can find the kubeconfig file in Azure Portal.

    ![The AKS cluster page in Azure Portal with Connect highlighted, opening a Connect pane with the az aks get-credentials command to download cluster credentials](https://documentation.cluedin.net/assets/images/paas-operations/upgrade/get-kube-config-2.png)

1. Store the file in a secure location. 

    Treat this file as sensitive information – it contains access credentials and cluster details.<br>**Do not commit** the file to a source control tool.

1. Once you have the kubeconfig file, configure your environment to use it. For example, in PowerShell, run the following:

    ```powershell
    $env:KUBECONFIG="path-to-file"
    ```

    This ensures that both kubectl and Helm commands will use the correct cluster context. 

## Configure kubectl 

Before performing an upgrade, you need to ensure that [kubectl](https://documentation.cluedin.net/operate/upgrade/required-tools.md#kubectl) is both installed and properly connected to your [Kubernetes](https://documentation.cluedin.net/operate/upgrade/required-tools.md#kubernetes) cluster. The steps below help you verify the installation and confirm that kubectl can communicate with the `cluedin` namespace.

**To configure kubectl**

1. To verify that kubectl is installed correctly, run the following command in PowerShell: 

    ```powershell
    kubectl version --client 
    ```
    - If kubectl is installed, you’ll see the client version details (for example, **Client Version: v1.30.0**).

    - If not, you’ll get a "command not found" error. In this case, contact your system administrator to install and configure kubectl properly. 

1. To confirm that kubectl is correctly connected to your cluster, run the following command in PowerShell: 

    ```powershell
    kubectl get pods --namespace cluedin 
    ```

    - You should see a list of pods as a result. 

    - If not, your [kubeconfig](#prepare-the-kubeconfig-file) or network access may not be configured correctly. Contact your administrator.

## Configure Helm

Before upgrading CluedIn, you need to make sure [Helm](https://documentation.cluedin.net/operate/upgrade/required-tools.md#helm) is installed, connected to the correct [Kubernetes](https://documentation.cluedin.net/operate/upgrade/required-tools.md#kubernetes) cluster, and configured with the CluedIn Helm repository. The steps below walk you through verifying your Helm setup and updating to the latest charts.

**To configure Helm**

1. To verify that Helm is installed correctly, run the following command in PowerShell:

    ```powershell
    helm version 
    ```

    - If Helm is installed, you’ll see the client version details (e.g., **v3.x.x**).

    - If you get a "command not found" error, this means that Helm is not installed or is not in your PATH. In this case, contact your system administrator to install and configure it properly.

1. To verify that you are connected to the cluster, run the following command in PowerShell: 

    ```powershell
    helm config current-context 
    ```

    - You should see the cluster name (for example, **aks-cluedin-eastus**).

    - If you get an error similar to "current-context is not set", contact your system administrator to ensure that the [kubeconfig](https://documentation.cluedin.net/operate/upgrade/required-tools.md#kubeconfig-file) is [configured](#prepare-the-kubeconfig-file) correctly. 

1. CluedIn publishes its latest Helm charts to a dedicated Helm repository. Verify that the repository is configured by running the following command:

    ```powershell
    helm repo list 
    ```

    - If CluedIn appears in the list, you are ready to use the repository.

    - If not, add the repository by running the following command: 

        ```powershell
        Helm repo add https://cluedin-io.github.io/Charts 
        Helm repo list 
        ```

1. Before performing any upgrade, always fetch the latest CluedIn charts: 

    ```powershell
    Helm repo update 
    ```

    This ensures that you are deploying the most up-to-date configurations and fixes.  

## Connect Lens or Freelens to your CluedIn cluster

> **Important:** This step is optional. It does not depend on the previous steps, you can perform it whenever appropriate.

Connecting [Lens or Freelens](https://documentation.cluedin.net/operate/upgrade/required-tools.md#lens-or-freelens) to your CluedIn cluster gives you a graphical interface to explore, monitor, and manage your [Kubernetes](https://documentation.cluedin.net/operate/upgrade/required-tools.md#kubernetes) environment. This makes it easier to visualize resources, check pod health, and debug issues compared to working only with the command line.

Lens or Freelens (depending on what you selected) connects to Kubernetes using your [kubeconfig file](#prepare-the-kubeconfig-file).

**To connect Lens or Freelens to your CluedIn cluster**

- Use on of the following methods:

    - Drop-in method – Place your kubeconfig into the system’s `.kube` folder (commonly located at `~/.kube/config`). 

    - UI method – Import or configure your cluster directly through the Lens (or Freelens) graphical interface.

Up: [Upgrade](https://documentation.cluedin.net/operate/upgrade.md)
