How fast is fast here? One command will do it! This article describes how to use HELM to complete the storage link of K8S monitoring data to Ali Cloud InfluxDB®.

On the helm

There is a lot of information available on the web about the installation and use of helm, which I won’t go into here. One thing to note is that although Helm 3 has been released recently, not all Helm Chart are helm 3 compatible in the short term, such as this issue in the community.

Helm 2 is still used for the installation in this article.

To prepare

It is assumed that users have purchased InfluxDB® instances on Ali Cloud and created accounts and databases. For details, see the official documents. Assume that the database is K8S, the user name is user1, and the password is abcd1234. InfluxDB® access addresses can be viewed on the Ali Cloud console. If the Kubernetes cluster is in the same Ali Cloud VPC, use the VPC address. Otherwise, use the public network address. It is assumed that access the address ts-yourisntanceid.influxdata.rds.aliyuncs.com: 3242

operation

With helm configured, all you need to do is run the following command:

* Please swipe left or right to view

helm install \
--namespace aliyun-influxdb \
--set prometheus.prometheusSpec.influxdatabase="k8s" \
--set prometheus.prometheusSpec.influxaddress="https://ts-yourisntanceid.influxdata.rds.aliyuncs.com:3242" \
--set prometheus.prometheusSpec.influxusername="user1" \
--set prometheus.prometheusSpec.influxpassword="abcd1234"\ - name influxdb - monitoring \ https://influxdb-public.oss-cn-hangzhou.aliyuncs.com/prometheus-operator-8.3.1.tgzCopy the code
You can then see the data written to the InfluxDB database.

Write in the back

This is probably the shortest tutorial ever.

Because the monitoring indicators of K8S are exposed in Prometheus format, this scheme is realized based on Promethy-operator, which provides pod and application discovery capability. Users can also conveniently monitor services (such as mysql and Redis) in K8S. All data is written to the InfluxDB® database.





The original link

This article is content of Ali Cloud, shall not be reproduced without permission