# Stackable Operator for Apache NiFi

> Manage NiFi clusters on Kubernetes with the Stackable operator. Explore features, dependencies, and supported versions for efficient data flow management.

-   [GitHub](https://github.com/stackabletech/nifi-operator/)

-   [Feature Tracker](https://features.stackable.tech/unified)

-   [CRD documentation](https://crds.stackable.tech/nifi-operator/26.7.0/)


This operator manages [Apache NiFi](https://nifi.apache.org/) clusters on Kubernetes. Apache NiFi is an open-source data integration tool that provides a web-based interface for designing, monitoring and managing data flows between various systems and devices, using a visual programming approach. It supports a wide range of data sources, formats and features such as data provenance, security and clustering.

## Getting started

Get started with Apache NiFi and the Stackable operator by following the [Getting started](https://docs.stackable.tech/home/stable/nifi/getting_started/index.md) guide. It guides you through the [installation](https://docs.stackable.tech/home/stable/nifi/getting_started/installation/index.md) process and [connect](https://docs.stackable.tech/home/stable/nifi/getting_started/first_steps/index.md) to the NiFi web interface. Afterward, have a look at the [Usage guide](https://docs.stackable.tech/home/stable/nifi/usage_guide/index.md) to learn how to configure your NiFi instance to your needs or run some [demos](https://docs.stackable.tech/home/stable/nifi/index.md) to learn more about using NiFi with other components.

## Operator model

The operator manages the _NifiCluster_ custom resource. NiFi only has a single process that it needs to run, so the NifiCluster has only a single [role](https://docs.stackable.tech/home/stable/concepts/stacklet/index.md): `node`. This role can be divided in multiple role groups.

![A diagram depicting the Kubernetes resources created by the Stackable operator for Apache NiFi](https://docs.stackable.tech/home/stable/nifi/_images/nifi_overview.drawio.svg)

For every role group the operator creates a ConfigMap and StatefulSet which can have multiple replicas (Pods). Every role group is accessible through it’s own Service, and there is a Service for the whole Cluster.

## Dependencies

NiFi builds its cluster quorum using Kubernetes by default and needs no additional dependencies. It can optionally use Apache ZooKeeper instead, which you can run in Kubernetes with the [Stackable Operator for Apache ZooKeeper](https://docs.stackable.tech/home/stable/zookeeper/index.md).

## Demos

NiFi is often a good choice as a first step in a data pipeline when it comes to fetching the data in various formats from various sources. The [data-lakehouse-iceberg-trino-spark](https://docs.stackable.tech/home/stable/demos/data-lakehouse-iceberg-trino-spark/index.md) demo uses NiFi to fetch six different datasets in various formats. The data is then ingested into a Kafka topic. Apache Kafka is also [part of the Stackable platform](https://docs.stackable.tech/home/stable/kafka/index.md).

The [nifi-kafka-druid-earthquake-data](https://docs.stackable.tech/home/stable/demos/nifi-kafka-druid-earthquake-data/index.md) and [nifi-kafka-druid-water-level-data](https://docs.stackable.tech/home/stable/demos/nifi-kafka-druid-water-level-data/index.md) demo use NiFi in the same way, both demos showcase downloading data from web APIs and ingesting it into Kafka.

## Supported versions

The Stackable operator for Apache NiFi currently supports the NiFi versions listed below. To use a specific NiFi version in your NifiCluster, you have to specify an image — this is explained in the [Product image selection](https://docs.stackable.tech/home/stable/concepts/product-image-selection/index.md) documentation. The operator also supports running images from a custom registry or running entirely customized images; both of these cases are explained under [Product image selection](https://docs.stackable.tech/home/stable/concepts/product-image-selection/index.md) as well.

-   2.9.0

-   2.7.2 (Deprecated)

    -   Please note that NiFi starting with 2.7.2 supports Iceberg, but only with S3 and Iceberg REST catalog (no Hive metastore or HDFS support). Please read on [Writing to Iceberg tables](https://docs.stackable.tech/home/stable/nifi/usage_guide/writing-to-iceberg-tables/index.md) for details.


-   2.6.0 (LTS)


For details on how to upgrade your NiFi version, refer to [Updating NiFi](https://docs.stackable.tech/home/stable/nifi/usage_guide/updating/index.md).

## Useful links

-   The [nifi-operator](https://github.com/stackabletech/nifi-operator/) GitHub repository

-   The operator feature overview in the [feature tracker](https://features.stackable.tech/unified)

-   The [NifiCluster](https://crds.stackable.tech/26.7.0/nifi.stackable.tech/nificluster/v1alpha1/) CRD documentation
