# InfluxDB deployment for Anomaly detection

**URL:** <https://community.influxdata.com/t/influxdb-deployment-for-anomaly-detection/31510>\
**Category:** Tasks\
**Tags:** time-series, kapacitor, kubernetes\
**Created:** [September 15, 2023, 5:26am UTC](https://community.influxdata.com/t/influxdb-deployment-for-anomaly-detection/31510 "2023-09-15T05:26:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Utkarsh\_Kumar](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/utkarsh_kumar/32/14299_2.png) [@Utkarsh\_Kumar](https://community.influxdata.com/u/Utkarsh_Kumar)\
**Post date:** [September 15, 2023, 5:26am UTC](https://community.influxdata.com/t/influxdb-deployment-for-anomaly-detection/31510/1 "2023-09-15T05:26:57Z")

</div>

We need to to deploy InfluxDB for anomaly detection in streaming data using Influx, Telegraf, and Kapacitor on K8s.  
Are we required to deploy each one as separate installations or can the use new version of Influx OSS handle all of that? If possible, could you provide some sample YAML for the deployment?  
Also, According to documentation [Kubernetes | InfluxData Platform Documentation](https://docs.influxdata.com/platform/integrations/kubernetes/#should-i-run-influxdb-in-kubernetes)  
Influx in kubernetes is not recommended. Can we use it standalone for the above.

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [September 20, 2023, 7:29pm UTC](https://community.influxdata.com/t/influxdb-deployment-for-anomaly-detection/31510/2 "2023-09-20T19:29:32Z")

</div>

Hello @Utkarsh_Kumar,  
Welcome!  
I wouldn’t recommend using Kapacitor. It doesn’t have support.  
I’d hold off on using InfluxDB v3 until the OSS and Community editions come out.  
Migrating from v1 to v3 will be easier.

Arguments in favor of using v3:  
[InfluxDB 3.0 is up to 45x Faster for Recent Data Compared to InfluxDB Open Source | InfluxData](https://www.influxdata.com/blog/influxdb-3-0-is-2.5x-45x-faster-compared-to-influxdb-open-source/#:~:text=By%20Charles%20Mahler%20%2F%20Aug%2009%2C%202023%20%2F%20InfluxDB&text=We%20summarize%20the%20performance%20benchmark,compression%20compared%20to%20InfluxDB%20OSS).

If you’re interested in deploying InfluxDB with K8s I suggest looking into:

> **[Announcing InfluxDB Clustered: InfluxDB 3.0 for Self-Managed Environments](https://www.influxdata.com/blog/announcing-influxdb-clustered/)**
>
> Today, we're excited to announce InfluxDB Clustered, our latest product developed on the #InfluxDB 3.0 product suite.

For anomaly detection using InfluxDB v3 I would aslo recommend the following resources:  
Using QUIX:

> **[Power Your Predictive Analytics with InfluxDB | InfluxData](https://www.influxdata.com/resources/power-your-predictive-analytics-with-influxdb/)**
>
> Join us for this webinar and learn how to take your data analysis to the next level by building predictive analytics using a variety of tools and techniques.

> **[Predictive Analytics Using a Time Series Database](https://thenewstack.io/predictive-analytics-using-a-time-series-database/)**
>
> Processing time-stamped data at high speed and volume, a time series database is particularly suited for anomaly detection and predictive maintenance.

Using Mage.ai:

> **[GitHub - InfluxCommunity/Mage\_InfluxDBv3: A project example of downsampling...](https://github.com/InfluxCommunity/Mage_InfluxDBv3)**
>
> A project example of downsampling with Mage.ai and InfluxDBv3 - GitHub - InfluxCommunity/Mage\_InfluxDBv3: A project example of downsampling with Mage.ai and InfluxDBv3

You can use the same tool and idea but add your anomaly detection instead.

Use the ADTK tool kit python package with MQTT and Telegraf and Grafana:

> **[GitHub - InfluxCommunity/Arrow-Task-Engine: This repository provides an...](https://github.com/InfluxCommunity/Arrow-Task-Engine)**
>
> This repository provides an example task engine utilising Apache Arrow. - GitHub - InfluxCommunity/Arrow-Task-Engine: This repository provides an example task engine utilising Apache Arrow.

For that example navigate to localhost:5005 to turn anomalies on and off.

A simple example of using Kafka and InfluxDB and Telegraf:

> **[GitHub - InfluxCommunity/influxdb-kafka-demo](https://github.com/InfluxCommunity/influxdb-kafka-demo)**
>
> Contribute to InfluxCommunity/influxdb-kafka-demo development by creating an account on GitHub.

Kafka, MQTT, and InfluxDB:

> **[GitHub - InfluxCommunity/kafka\_mqtt\_tutorial: This repository contains a...](https://github.com/InfluxCommunity/kafka_mqtt_tutorial)**
>
> This repository contains a three part exploration to working with MQTT and Kafka. - GitHub - InfluxCommunity/kafka\_mqtt\_tutorial: This repository contains a three part exploration to working with ...

These are all pretty simple examples but hopefully they’ll get you started with the general architecture idea for building an anomaly detection pipeline.  
Basically regardless of whether you’re using v1 or v3 you’ll want to use some other tools with a client library ( I recommend python) for the actual anomaly detection
