This topic describes how to install the Kompass Insights agent on an Azure AKS cluster. After installing, the cluster and the agent are “connected.”
The Kompass Insights agent (“agent”) provides visibility into your K8s cluster and workload costs, scaling performance, usage, and pattern history. With agent visibility, Kompass can make recommendations for your environment.
The agent requires read-only access to the services defined in the Insights agent YAML.
VictoriaMetrics settings
Kompass Insights uses VictoriaMetrics to store and query cluster metrics.
VictoriaMetrics can run in Single-Pod mode or Cluster mode, which determines the availability, resilience, and scalability of metrics storage and queries.
Single-Pod mode (default): runs a standalone VictoriaMetrics instance. This mode is suitable for small or non-production environments and provides no redundancy if the Pod becomes unavailable.
Cluster mode: runs a multi-component VictoriaMetrics cluster (
vmselect,vminsert, andvmstorage) with multiple replicas. This mode provides higher availability, fault tolerance, and scalability.
Cluster mode is recommended for:
production clusters
large clusters (for example, 100+ nodes or 1,000+ Pods)
high-churn environments, where approximately 10% or more of workloads are Jobs, CI/CD pipelines, or other short-lived Pods
KEDA-heavy environments, where KEDA manages at least 10% of workloads
You select the deployment mode by editing values.yaml, as described in the next section.
How to connect a cluster to the agent
To connect to the agent, you install a Helm chart based on a values.yaml file.
The Connect cluster wizard will prepare values.yaml as it guides you through the following steps:
Use the Connect cluster wizard to create unique Terraform code to generate the Managed Identity’s Client ID. (You can see the Terraform template at https://github.com/zesty-co/terraform-kompass-insights-azure)
The client ID is needed to enable authentication between Kompass and Azure.
You can find the Subscription ID, Resource Group, and Cluster name in Azure.
The Resource group and Cluster name will be embedded inside the resultant code.
When you run the code, it outputs the Managed Identity Client ID.Define specific values for the values.yaml file:
cert-manager (Mandatory): Is it installed or not?
If it’s not installed, Kompass will install it during the Helm chart installation.PVC storage class (Mandatory): The name of the PVC StorageClass.
The agent is installed with a PVC, so this is required.
If you don’t know the name, you can discover it by running this command:Kubectl get storageclassClient ID: the ID for which the Azure token is being requested.
This value is created by running the Terraform code.You can see the full list of YAML parameters here.
Download values.yaml to your terminal.
At this point, you can make further modifications to values.yaml.For best performance with Kompass, we recommend modifying disk usage parameters for Kompass Insights PVC size and VictoriaMetrics server volume size.
For more information, click here.
Based on our experience, setting these disk usage parameters based on workloads in the cluster yields the best performance:
Parameter
Workloads and value
Code
Kompass Insights PVC size
Up to 1,000 workloads = 1Gi
From 1,000 - 5,000 workloads = 3Gi
From 5,000 - 10,000 workloads = 10Gi
Above 10,000 workloads = 100Gi
kompass-insights: persistence: spec: resources: requests: storage: “1Gi”VictoriaMetrics server volume size
Up to 1,000 workloads = 30Gi
From 1,000 - 10,000 workloads = 60Gi
Above 10,000 workloads = 100Gi
victoriaMetrics: server: persistentVolume: size: "30Gi"Set the VictoriaMetrics deployment mode in values.yaml:
To enable this mode
Set these values
Single mode
victoriaMetrics:enabled: truevictoriaMetricsCluster:enabled: falsevictoriaMetricsAuth:enabled: trueuseSingle: trueCluster mode
victoriaMetrics:enabled: falsevictoriaMetricsCluster:enabled: truevictoriaMetricsAuth:enabled: trueuseSingle: falseEnsure the selected mode matches your environment’s availability and scalability requirements before running the Helm installation. For more information, see VictoriaMetrics settings.
If you edit victoriaMetrics parameters, ensure that the values of these parameters are equal:
victoriaMetricsNameOverride,victoriaMetricsRemoteUrl, andvictoriaMetricsRemoteWriteUrl.You can control the nodes on which the Insights agent runs using the
nodeSelectorandtolerationsconfigurations, here.
Install the agent Helm chart, using the definitions in values.yaml.
You must be connected to the same cluster that you are connecting to the agent.Tell Kompass that you’re done!
Prerequisites
Kompass is installed in the cluster.
The administrator client on which the agent will be installed must be able to use the following:
Agent permissions
To install the Insights agent on an Azure cluster:
Generate the client ID:
Run the Connect cluster wizard to create Terraform code:
Open the Connect cluster wizard:
From the Kompass > Dashboard, click Connect cluster.
From the Kompass > Clusters page, click Connect cluster.
Choose Azure from the CSP list.
The Connect cluster wizard begins, showing the Permissions tab.Enter the Azure subscription ID, resource group, and cluster name.
As you type, the Terraform code is updated with the cluster name and resource group.
Run Terraform to generate the client ID:
Copy the Terraform code and paste it to a terminal window.
Run
terraform initandterraform apply.Confirm to Terraform.
When the process completes, the client ID is displayed as output.
Copy the client ID.
From the Connect cluster wizard, click Next.
The Prepare values.yaml tab is shown.
Define YAML parameter values:
cert-manager: If you select No, it will be installed.
PVC storage class: To see the current storage class, run
kubectl get storageclassClient ID: Paste the value from the Terraform output.
For more details about the parameters, see How to connect a cluster to the agent.Click Next.
The Install Helm chart tab is shown.
Download values.yaml to your terminal:
Click the values.yaml icon and paste the code to the terminal.
Run the code to download the file.
After you download, you can use a file editor to edit values in the file, as described in step 3 of the previous section.
Configure the victoriaMetrics mode (default: Single mode).
(Recommended) Edit the values of the Kompass Insights PVC size and the VictoriaMetrics server volume size.
Install the Helm chart:
Click the install command icon and paste the code to the terminal.
IMPORTANT
Before installing, ensure that you are connected to the correct cluster and that the path to Helm is correct.
Run the code to install the agent Helm chart.
When the Helm chart installation is complete, click Helm install is done.
A confirmation message is displayed.Verify the deployment by running the following command:
kubectl get pods -n zesty-system
You should see one Pod running and then a second one.
Once the Insights agent is installed, Kompass starts collecting cluster data:
For the Pod rightsizing solution, it can take up to 24 hours before recommendations are displayed.