Deploy Insight Agent via Helm¶
This article describes the steps to install the Community Edition of Insight Agent by running Helm commands on the command line.
Install Insight Agent¶
-
Use the following command to add the address of the image repository.
-
Installing Insight Agent requires that Insight Server in the global service cluster is running properly. Run the following command to install the Community Edition of Insight Agent. This configuration does not enable the Tracing feature:
First set the deployment version, service address and port, and the username and password for Elasticsearch. For the service address, refer to How to Get the Connection Address below. Replace the following placeholders with your actual configuration:
version="<deployment version>" es_host="<Elasticsearch address>" es_port="<Elasticsearch port>" es_user="<Elasticsearch username>" es_password="<Elasticsearch password>" vminsert_host="<vminsert address>" vminsert_port="<vminsert port>" otel_col_host="<opentelemetry-collector address>" otel_col_auditlog_port="<opentelemetry-collector audit log port>" helm upgrade --install --create-namespace --cleanup-on-fail \ --version "${version}" \ insight-agent insight/insight-agent \ --set global.exporters.logging.elasticsearch.host="${es_host}" \ --set global.exporters.logging.elasticsearch.port="${es_port}" \ --set global.exporters.logging.elasticsearch.user="${es_user}" \ --set global.exporters.logging.elasticsearch.password="${es_password}" \ --set global.exporters.metric.host="${vminsert_host}" \ --set global.exporters.metric.port="${vminsert_port}" \ --set global.exporters.auditLog.host="${otel_col_host}" \ --set global.exporters.auditLog.port="${otel_col_auditlog_port}" \ -n insight-systemInfo
You can refer to How to Get the Connection Address for the address information.
-
Run the following command to check the installation status:
How to Get the Connection Address¶
Install Insight Agent in the Global Service Cluster¶
If the Agent is installed in the management cluster, it is recommended to access the cluster through a domain name:
export vminsert_host="vminsert-insight-victoria-metrics-k8s-stack.insight-system.svc.cluster.local" # metrics
export es_host="insight-es-master.insight-system.svc.cluster.local" # logs
export otel_col_host="insight-opentelemetry-collector.insight-system.svc.cluster.local" # traces
Install Insight Agent in the Worker Cluster¶
When the global service cluster exposes services through the default LoadBalancer, log in to the console of the global service cluster and run the following commands:
export INSIGHT_SERVER_IP=$(kubectl get service insight-server -n insight-system --output=jsonpath={.spec.clusterIP})
curl --location --request POST 'http://'"${INSIGHT_SERVER_IP}"'/apis/insight.io/v1alpha1/agentinstallparam'
The following return value will be obtained:
{"global":{"exporters":{"logging":{"output":"elasticsearch","elasticsearch":{"host":"10.6.182.32"},"kafka":{},"host":"10.6.182.32"},"metric":{"host":"10.6.182.32"},"auditLog": {"host":"10.6.182.32"}}},"opentelemetry-operator":{"enabled":true},"opentelemetry-collector":{"enabled":true}}
Among them:
- global.exporters.logging.elasticsearch.host is the log service address [there is no need to set the port of the corresponding service, the default values will be used];
- global.exporters.metric.host is the metric service address;
- global.exporters.trace.host is the trace service address;
- global.exporters.auditLog.host is the audit log service address (the same service as traces but with a different port);
Log in to the console of the global service cluster and run the following commands:
Among them:
- lb-vminsert-insight-victoria-metrics-k8s-stack is the metric service address;
- lb-insight-opentelemetry-collector is the trace service address;
- mcamel-common-es-cluster-masters-es-http is the log service address;
When the global service cluster exposes services through Nodeport, log in to the console of the global service cluster and run the following commands:
Among them:
- vminsert-insight-victoria-metrics-k8s-stack is the metric service address;
- insight-opentelemetry-collector is the trace service address;
- mcamel-common-es-cluster-masters-es-http is the log service address;
Upgrade Insight Agent¶
-
Log in to the console of the target cluster and run the following command to back up the
--setparameters. -
Run the following command to update the repository.
-
Run the following command to upgrade.
-
Run the following command to check the installation status: