Azure Kubernetes Service (AKS) - Utility Installation Troubleshooting steps

Azure Kubernetes Service (AKS) - Utility Installation Troubleshooting steps

Overview

      This KB provides troubleshooting steps to resolve Azure Kubernetes monitoring failures that occur when data collection fails due to missing or inaccessible utilities (azure-cli, kubectl, kubelogin). These issues typically occur when the prerequisite utilities are not installed or installed by a different user than the Applications Manager service logon user.

Installation and Permission Restricted Errors

Notes
Note: The error messages mentioned below are the updated messages displayed from Applications Manager v17.82.00

Error 1: Azure CLI Utility Not Found

  1. Error Message: Data collection has stopped because the azure-cli utility is not found. Error: Exception :: Cannot run program "az.cmd": CreateProcess error=2, The system cannot find the file specified. Ensure that azure-cli is installed and accessible to the Applications Manager service logon user ({UserName}), or start the Applications Manager with a user account that can access azure-cli. Please refer troubleshooting for more information.
  2. Verify Azure CLI Installation
    1. Open Command Prompt (Windows) or Terminal (Linux)
    2. Run the following command: 
      Quote
      az version
    3. Expected Output: Displays the Azure CLI version information. 
                      
    1. If the command is not recognized: Azure CLI is not installed.
                     
    1. If Azure CLI is not installed
      1. Install the Azure CLI on an Applications Manager-installed machine (Windows or Linux) to configure the cluster with kubectl for monitoring. Learn more.
    2. If Azure CLI is installed, ensure it is accessible to Applications Manager logon user.

Error 2:  kubectl Utility Not Found

Two variations of the error are shown depending on whether the default installation path is in the user’s PATH environment variable.
  1. Error Message 1: The below message appears when the kubectl's default installation path for the Applications Manager service logon user is present in the environment variable 'Path', but kubectl is still not accessible.
  2. QuoteData collection has stopped because the kubectl utility is not found. Error: Exception :: Cannot run program "kubectl": CreateProcess error=2, The system cannot find the file specified. Ensure that kubectl is installed and accessible to the Applications Manager service logon user ({UserName}), or start the Applications Manager with a user account that can access kubectl. Please refer troubleshooting for more information.
  3. Error Message 2: The below message appears when the kubectl's default installation path for the Applications Manager service logon user is not present in the environment variable 'Path'.
  4. QuoteData collection has stopped because the kubectl utility is not found. Error: Exception :: Cannot run program "kubectl": CreateProcess error=2, The system cannot find the file specified. Ensure that kubectl is installed and accessible to the Applications Manager service logon user ({UserName}), or start the Applications Manager with a user account that can access kubectl. Also, the default installation path '%USERPROFILE%\\.azure-kubectl' is not set in the environment variable for the logon user. Please refer troubleshooting for more information.
  5. Verify kubectl Installation
    1. Open Command Prompt (Windows) or Terminal (Linux)
    2. Run the command:
      Quote
      kubectl version --client
    3. Expected Output: Displays the kubectl client version.
                        
    1. If the command is not recognized: kubectl is not installed.
                        
    1. If the kubectl utility is not installed, install the compatible 'Kubectl' utility executable file (kubectl.exe) by following the prerequisite steps.
    1. If the kubectl utility is installed, ensure it is accessible to Applications Manager logon user. Refer to the troubleshooting steps for utility access issue encountered on Windows.

Error 3:  kubelogin Utility Not Found

  1. Error Message 1: The below message appears when the kubelogin's default installation path for the Applications Manager service logon user is present in the environment variable 'Path', but kubelogin is still not accessible.
  2. QuoteUnable to collect kubectl performance metrics due to an error with the 'kubelogin' command: kubelogin convert-kubeconfig -l azurecli. Error: Exception :: Cannot run program "kubelogin": CreateProcess error=2, The system cannot find the file specifiedEnsure that kubelogin is installed and accessible to the Applications Manager service logon user ({UserName}), or start the Applications Manager with a user account that can access kubelogin. Please refer troubleshooting for more information.
  3. Error Message 2: The below message appears when the kubelogin's default installation path for the Applications Manager service logon user is not present in the environment variable 'Path'.
  4. QuoteUnable to collect kubectl performance metrics due to an error with the 'kubelogin' command: kubelogin convert-kubeconfig -l azurecli. Error: Exception :: Cannot run program "kubelogin": CreateProcess error=2, The system cannot find the file specified. Ensure that kubelogin is installed and accessible to the Applications Manager service logon user ({UserName}), or start the Applications Manager with a user account that can access kubelogin. Also, the default installation path '%USERPROFILE%\\.azure-kubelogin' is not set in the environment variable for the logon user. Please refer troubleshooting for more information.
  5. Verify kubelogin Installation
    1. Open Command Prompt (Windows) or Terminal (Linux)
    2. Run the command:
      Quote
      kubelogin --version
    3. Expected Output: Displays the kubelogin version.
                      
    1. If the command is not recognized: kubelogin is not installed.
                     
    1. If the kubelogin utility is not installed, install the compatible kubelogin.exe along with kubectl.exe by following the prerequisite installation steps.
    2. If the kubelogin utility is installed, ensure it is accessible to Applications Manager logon user. Refer to the troubleshooting steps for utility access issue encountered on Windows.

Troubleshooting Utility Access Issue (Windows)

  1. Issue: Applications Manager running in Service mode uses the 'Local System account' as Log On user by default. If kubectl and kubelogin are installed via "az aks install-cli --client-version [client-version]" they are placed in user-specific folders and added to that user’s 'Path' Environment Variable. Since the service runs under the 'Local System account', it cannot access the utilities installed to specific user, causing data collection to fail.
  2. How to fix:
    1. Check the Logon User of Applications Manager
      1. Open Services (services.msc).
      2. Locate the service ManageEngine Applications Manager (or similar).
      3. Right-click → Properties → Log On tab.
      4. Note the Log on as user account (e.g., Local System, Administrator, or a domain user).
                                          

      1. Ensure Applications Manager Logon User Has Access to Utilities
        1. Verify that the user running Applications Manager has performed the Azure Kubernetes Service monitor prerequisites by installing the required utilities (azure-cli, kubectl, kubelogin).
        2. If the logon user is different from the user who installed the utilities, perform one of the following actions:
          1. Option 1: Change the Applications Manager service logon user (via Services) to the user who has access to the utilities.
          2. Option 2: Log in as the Applications Manager's logon user and install the required utilities by performing the AKS monitor prerequisites.