Skip to main content
Skip table of contents

AKS - Azure Kubernetes service onboarding

Mavvrik supports two ways to connect an AKS cluster, as shown in the Connect AKS Cluster screen:

  • Managed-Prometheus Based – recommended when you want onboarding without installing appliance

  • Appliance-Based – recommended when you need deeper telemetry and more detailed Kubernetes insights.

Steps to onboard the AKS cluster(Appliance based)

Before onboarding your AKS account, you must have the admin rights on the cluster that you want to onboard and follow the steps below

Step-1: Install helm and kubectl in Azure .

If Helm and kubectl are already installed, skip the steps below and proceed to https://help.mavvrik.ai/content/aks-azure-kubernetes-service-onboarding#AKS-AzureKubernetesserviceonboarding-Step-2:StepstoperforminMavvrik .

If they are not installed, follow the steps below to install them

  1. Navigate to Kubernetes services in the Azure .

  2. Click on the cluster you want to connect.

  3. Click on the connect button

image-20240919-111144.png
  1. Click on Open Cloud Shell which will run the commands automatically

    image-20260227-053544.png

  2. Install kubectl in the already opened cloud shell

    CODE
    #bash
    az aks install-cli
    
  3. Install Helm in the already opened cloud shell

    CODE
    #Windows
    winget install Helm.Helm
    
    #macOS
    brew install helm
    
    #Linux
    curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

Step-2: Steps to perform in Mavvrik

  1. Go to the Menu

  2. Click on Admin → Kubernetes

    image-20240919-113310.png
  3. Click on the AKS tab

  4. Click on 'Connect'

  5. Enter your Prometheus URL

Steps to get Prometheus URL

  1. Capture the Prometheus URL associated with the K8s cluster:

a. Enter the following URL in Mavvrik UI

CODE
http://<prometheus-server-name>.<namespace>:<prometheus-internal-port>

b. To find the Prometheus service, run the following command in Kubernetes shell

CODE
kubectl get svc -n prometheus
image-20240606-090502.png
  1. In URL Replace prometheus-server-name,namespace & prometheus-internal-port with your data

  2. The following screenshot shows an example of a URL

image-20240606-085030.png
image-20260129-062158.png
  1. Copy the Mavvrik UI Step-3 Kubernetes Shell command and run it in azure cloud shell which is already opened from the previous steps

  2. After executing the command, the Kubernetes appliance will be installed

image-20240919-130628.png

8. Click on the Connect button in Mavvrik

Direct Cluster Navigation

There is a clickable link on the cluster names. This allows to seamlessly navigate to detailed cost insights for each cluster directly from the Kubernetes Admin page.

image-20250120-034030.png

Instructions to Enable Monitoring and Create Workspace (Managed Prometheus)

To enable monitoring for the AKS cluster, the user must be assigned either the Monitoring Reader or Monitoring Contributor role.

Below is the required workspace information for Azure Monitor:

Feature

Workspace

Notes

Managed Prometheus

Azure Monitor workspace

If you don’t specify an existing Azure Monitor workspace during onboarding, the default workspace for the resource group will be used. If a default workspace does not exist in the cluster’s region, one will be automatically created with the name format DefaultAzureMonitorWorkspace-<mapped_region> in a resource group named DefaultRG-<cluster_region>.

Below are the steps to create workspace

  1. Log in to the Azure portal (https://portal.azure.com/ , user must have the above-mentioned roles)

  2. search “Azure Monitor workspaces.”

  3. Click on +create

    image-20260226-081922.png


  4. Subscription – Select your subscription

  5. Resource Group – Select existing or create new

  6. Workspace Name – Provide a unique name

  7. Region – Choose the same region as your AKS cluster

    image-20260226-082311.png

  8. Click on the monitoring tab

  9. Click on enable

  10. Select Log Analytics workspace

    image-20260226-082628.png
  11. Click on Review + create

  12. Click on Create

Instructions to Enable Prometheus metrics and container logging (Managed Prometheus)

Mavvrik Kubernetes Solutions requires more metrics related to CPU, Memory, GPU, Volume which needs extra configuration at cluster level

  1. Login to Cluster using connect

image-20260128-034326.png

follow the steps to connect to the cluster

image-20260128-034502.png
  1. create the following configMap: ama-metrics-settings-cm.yaml 

CODE
apiVersion: v1
kind: ConfigMap
metadata:
  name: ama-metrics-settings-configmap
  namespace: kube-system
data:
  # Optional: set a stable cluster label; otherwise AKS name is used.
  prometheus-collector-settings: |-
    cluster_alias = ""

  # Ensure default targets are enabled (kubestate is required for kube_node_labels).
  default-scrape-settings-enabled: |-
    kubelet = true
    coredns = true
    cadvisor = true
    kubeproxy = true
    apiserver = true
    kubestate = true
    nodeexporter = true
    windowsexporter = false
    windowskubeproxy = false
    prometheuscollectorhealth = false

  # Ingest ALL metrics scraped for the default targets (can significantly increase volume).
  default-targets-metrics-keep-list: |-
    minimalingestionprofile = false

  debug-mode: |-
    enabled = false

  # kube-state-metrics configuration override: allowlist node label carrying AKS nodepool name
  # (will appear in Prometheus as label_kubernetes_azure_com_agentpool).
  ksm-config: |-
    labels_allow_list:
      pods:
      - app
      - app.kubernetes.io/name
      - app.kubernetes.io/instance
      - k8s-app
      nodes:
      - kubernetes.azure.com/agentpool

This is enable all the required metrics for Mavvrik Data Collection.

  1. Create the configmap using

CODE
kubectl create -f ama-metrics-settings-cm.yaml

Verification Steps:

  1. Navigate to Managed Prometheus Page in Azure Portal

    image-20260128-034813.png
  2. Select the Workspace/Cluster for which configmap was applied in above steps:

  3. On the left hand side Select Managed Prometheus > Prometheus explorer

    1. then select the time range to 5 mins > in PromQL console search for kube_node_labels metrics it should provide results like below, which confirm all configMap is deployed successfully.

      image-20260128-035255.png

  1. Navigate to Mavvrik portal > Admin > K8s and connect the managed Promethous cluster

    image-20260130-094931.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.