Apache NiFi on Docker vs Kubernetes vs VMs

Kubernetes suits teams that already operate clusters, VMs suit teams with mature patching and ZooKeeper operations, and Docker on plain hosts suits teams that want container packaging without a scheduler. The choice also shapes the NiFi 2.x migration, so confirm sizing, clustering and security in your own environment before you commit.

On this page

Which Apache NiFi deployment model fits your team

Kubernetes fits teams that already run and operate clusters and want NiFi's Kubernetes coordination, where cluster state and leader election use ConfigMaps or Leases. Virtual machines fit teams with established VM patching, ZooKeeper operations or a fixed on-premises estate, because NiFi's ZooKeeper-coordinated clustering lands on skills those teams already have. Docker on its own hosts fits teams that want container packaging and repeatable images without a cluster scheduler. The choice is also a migration decision. NiFi 1.x can no longer be maintained because it depends on Jetty 9.4, Spring Framework 5.3 and AngularJS 1.8, which cannot be upgraded in that line, so planning a move to the 2.x line is part of the decision whichever model you pick. Sizing, clustering and security settings must be confirmed in the NiFi administration guide and in your own environment before you commit.

Start with the runtime and the network. NiFi 2.x requires Java 21 as its minimum runtime, and the optional Python-based processors need Python 3.10, 3.11 or 3.12, which the NiFi administration guide describes as a beta feature. Without a security configuration, NiFi binds to 127.0.0.1, so a container or VM build must set the bind address, TLS and an authentication provider on purpose. The guide lists single-user, LDAP, OpenID Connect, SAML 2.0 and X.509 client certificate options, and the Kerberos provider is deprecated, so confirm with your identity team which option they will support before you build images or templates. Each model also decides where cluster coordination lives: embedded or external ZooKeeper on hosts and containers, or ConfigMaps and Leases on Kubernetes. Check that your team can operate the one you choose, including how it replaces or recovers a node.

Use the migration to test your operating model before production. Take one representative flow, run it on a candidate model with a 2.x build, and time the steps your team would own: a version upgrade, a node replacement, a restore from backup and a certificate rotation. Work from the NiFi Migration Guidance, because 2.0 removed the variable registry expression language scope in favor of an ENVIRONMENT scope and renamed the distributed map cache components, so flows and parameter handling may need edits. Also decide where flows are versioned. NiFi Registry is deprecated and planned for removal in NiFi 3.0, and the NiFi 2 Flow Registry Clients for GitHub and GitLab are the alternatives to confirm against your change process. Record the results as the evidence for your choice.

How Kubernetes and VMs compare for Apache NiFi clusters

This table compares Kubernetes and virtual machines for an Apache NiFi cluster on the factors that shape daily work, from coordination and sizing to backup and air-gapped delivery. Each row states the condition under which that option is the better fit. The main takeaway is that Kubernetes moves coordination and placement decisions to the platform team, while VMs keep them with the NiFi team, and either path should plan the move to NiFi 2.x if you still run 1.x.

FactorKubernetes (option A)Virtual machines (option B)
Cluster coordinationUses ConfigMaps or Leases for state and leader election, with no ZooKeeper ensemble to run. Better for teams already operating Kubernetes.Embedded or external ZooKeeper. External suits teams already running an ensemble; embedded suits smaller clusters with fewer moving parts.
Sizing and node placementPlatform team owns node pools, requests, limits and anti-affinity. Better when a platform team already schedules other stateful workloads.The NiFi team owns host sizing and placement directly. Better when it needs fixed disk layouts for the content and provenance repositories.
Sizing driversRequests and limits follow throughput, flow complexity and repository disk I/O. Better when the platform team can tune them from your load tests.Host CPU, memory and disk follow the same drivers. Better when the team can size hosts from your load tests and the administration guide.
Upgrade pathRolling restarts managed by the cluster, with state kept on persistent volumes. Better for teams with tested pipelines for image promotion.In-place or side-by-side upgrades on each node, scripted by the team. Better when change windows and host patching already run on VM tooling.
Network exposure of the UIExposed through an ingress or load balancer that the platform team configures. Better when the cluster already enforces TLS and SSO at the edge.Without security settings, NiFi binds to 127.0.0.1, so the UI stays local until configured. Better when host firewall rules are managed by the team.
Backup scopePersistent volumes, flow definition and the Kubernetes manifests or charts, backed up separately. Better when the cluster already has volume snapshot tooling.Flow definition, repositories and config directories on each host, captured by host-level backup. Better when VM backup tooling already covers all hosts.
Operating skillsKubernetes operations, persistent storage and ingress skills, plus NiFi knowledge. Better when the team already runs stateful workloads on Kubernetes.Linux administration, Java 21 runtime management and host patching, plus NiFi knowledge. Better when the team has a mature VM estate.
Fit for air-gapped estatesWorkable with an internal image registry and mirrored artifacts. Better when the cluster already runs offline.Simple to mirror installers and dependencies onto hosts with no external access. Better when the estate has no cluster platform at all.

What each Apache NiFi deployment model puts around every node

Each Apache NiFi deployment model wraps the same NiFi node in different packaging, coordination and operating objects. The cards below cover what your team builds and owns in each model, followed by the requirements every model shares.

Docker containers on hosts

With Docker, your team builds or selects the NiFi image, runs each node as a container on hosts you manage, and decides which ports are exposed, including the UI and the cluster communication ports. Confirm container guidance and image options on the NiFi download page before you standardize, since packaging details change between releases. Check that each node's repositories, flow files and configuration sit on volumes that outlive the container, and that the UI is reachable only from networks you have approved.

NiFi download page

Kubernetes state and workloads

On Kubernetes, NiFi can use ConfigMaps or Leases for cluster state and leader election, so the design does not need a separate ZooKeeper ensemble for that role. Your team owns the workload and storage objects: the workload controller for the nodes, persistent volume claims for the repositories, services, and the RBAC rules that let NiFi read and write its ConfigMaps or Leases. Check that repositories survive pod rescheduling and that Lease permissions are limited to the NiFi namespace. Confirm object types and supported versions against the administration guide before you commit.

NiFi administration guide

VM clusters and ZooKeeper

On virtual machines, NiFi forms a zero-leader cluster, meaning no node is permanently assigned as leader, and ZooKeeper coordinates the cluster. Decide between embedded and external ZooKeeper before go-live. Embedded ZooKeeper runs alongside NiFi, while an external ensemble is operated as its own service with its own patching, backups and monitoring. Check that ZooKeeper and NiFi nodes are sized and monitored together, and that you have a written procedure for restoring quorum after a failure.

NiFi administration guide

Shared requirements for every model

Every model needs Java 21 as the minimum runtime. Python-based processors are optional and need Python 3.10, 3.11 or 3.12, a feature the NiFi administration guide describes as beta. Authentication providers include single-user, LDAP, OpenID Connect, SAML 2.0 and X.509 client certificates, while Kerberos is deprecated, so confirm your identity plan does not depend on it. For flow versioning, use the Flow Registry Clients for GitHub and GitLab, because NiFi Registry is deprecated and planned for removal in NiFi 3.0.

GitHub Flow Registry Client

How team skills lead to an Apache NiFi topology

The path starts with whether the team already runs Kubernetes in production. If yes, confirm that NiFi's ConfigMap and Lease coordination fits cluster policy. If no, check VM patching and ZooKeeper operations. A single host can run NiFi in a non clustered Docker setup, which you should confirm against the vendor container guidance. Every branch meets at the authentication method (single user, LDAP, OpenID Connect, SAML 2.0 or X.509 client certificates; Kerberos is deprecated) and the Java 21 runtime check. The path ends at a confirmed topology and an upgrade plan.

Decision path from Kubernetes experience to a confirmed NiFi topology and upgrade plan.

How upgrades, backups and monitoring differ by platform

This table compares running Apache NiFi on Kubernetes and on virtual machines across upgrades, backup, monitoring and operating skills. Read each cell against the condition named in it, such as whether you still run 1.x or already operate clusters for other workloads. The main takeaway is that the 1.x to 2.x move is a migration whichever platform you choose, so platform choice changes the mechanics of backup and rollout more than the upgrade decision itself.

AreaKubernetesVMs
Moving off 1.xMove flows to 2.x before changing images. 1.28 is the last 1.x minor, and Kubernetes does not change that.Same 1.x limit. Staying on 1.x means running a line that cannot be maintained further, so plan the 2.x move on the host.
Migration cutoverTest in a separate namespace. Check variable registry scope, replaced by an ENVIRONMENT scope in 2.0, and renamed cache components.Test on a copy of the host before cutover. Check variable registry scope, replaced by an ENVIRONMENT scope in 2.0, and renamed cache components.
Upgrades within 2.xRolling replacement works best where state sits in ConfigMaps or Leases. Confirm the restart order for any ZooKeeper-coordinated setup in the administration guide.Restarts run through your own scripts or runbooks. Upgrade the Java 21 runtime on each host and confirm the order in the administration guide.
BackupSnapshot the three repository volumes and the flow definition together. Confirm the procedure in the administration guide.Back up each node's repository directories and flow definition. Confirm whether NiFi must be stopped first in the administration guide.
MonitoringUses the cluster's metrics and log stack for pods and volumes, plus NiFi's own UI and bulletins. Confirm which NiFi metrics your version exposes.Host agents and log shipping are yours to install. NiFi's UI and bulletins show flow health; confirm metrics export options for your version.
Operating skillsNeeds Kubernetes operators who can manage volumes, probes and rolling upgrades, plus NiFi flow owners. Fits if your platform team already runs clusters for other workloads.Needs Linux administration, Java 21 runtime upkeep and NiFi flow owners. Fits teams with no container platform to share and a simple, stable host estate.

How Apache NiFi clustering and high availability behave on each platform

On virtual machines, NiFi clustering uses the zero-leader model in the administration guide: every node runs the same flow, and cluster roles are elected through ZooKeeper, which you can run embedded in the NiFi nodes or as an external ensemble. Most teams with a separate operations group should evaluate the external ensemble first, because ZooKeeper then has its own patching, monitoring and failure handling, and a NiFi node reboot does not touch it. When a node fails, the remaining nodes keep processing, but you should confirm in your NiFi version how role election and flow reconnection behave. For rolling restarts, restart one node at a time, wait for it to rejoin the cluster, and check the cluster status before you move to the next node. Write that sequence into a runbook and rehearse it before the first production change.

On Kubernetes, the same zero-leader model applies, but coordination state and leader election use ConfigMaps or Leases, so you do not run a separate ZooKeeper ensemble. The operational risk moves to pod lifecycle: a pod that is evicted, rescheduled or replaced during a StatefulSet update must rejoin the cluster, and the content repository must sit on persistent storage that follows the pod. Your platform team needs to own the RBAC permissions that let NiFi manage ConfigMaps or Leases, along with pod disruption budgets and volume configuration. Check the NiFi administration guide for the election mechanism your version uses, then test a rolling update in a non-production cluster before you depend on it for uptime.

Sizing drivers apply on all three platforms and determine how many nodes you need and how much coordination capacity sits beneath them. Flow complexity, data volume, content repository disk, JVM heap and node count interact: flows that hold large content need disk headroom and heap for buffering, while heavily branched flows need more processing capacity on each node. Ask your NiFi implementation partner for a sizing plan tied to your actual flows, and confirm ZooKeeper ensemble sizing and node counts in the administration guide. Then run your own load tests with production-like payloads and record disk, heap and queue behavior under peak load. Use those results to settle the final topology, and do not copy node counts or heap values from examples or documentation into your plan without that test.

Which team should choose each Apache NiFi deployment model

Choose this path when your platform team already runs Kubernetes in production, with GitOps, ingress, secrets management and storage classes in place. NiFi then becomes one more stateful workload on a platform you already operate. The Kubernetes model can coordinate cluster state and leader election through ConfigMaps or Leases, so confirm whether your chosen chart or operator needs a separate ZooKeeper ensemble at all.

  • Images: you build, scan and patch the NiFi image, and you pin the Java 21 runtime it depends on.
  • Storage: you size persistent volumes for flow content and provenance data, and you set retention through your storage classes.
  • Certificates: you issue and rotate TLS certificates for the UI and cluster traffic through your existing certificate issuer.
  • Skill gap: flow design, provenance queries and the behavior changes in NiFi 2, which most platform teams have not yet operated.

Before production, confirm how your chart or operator handles cluster state, leader election and rolling upgrades, and test a restore into a separate namespace.

Securing the Apache NiFi UI on Docker, Kubernetes and VMs

Without a security configuration, NiFi binds to 127.0.0.1, so the UI is reachable only through the loopback interface. Every deployment model therefore needs a deliberate exposure path before anyone outside the host can log in. On Docker, that path is a port mapping you choose and limit to known networks. On Kubernetes, it is usually an ingress or load balancer in front of the NiFi service, which places TLS termination and access policy where your platform team already manages them. On VMs, it is the host firewall and network rules, plus any load balancer placed in front of the host. Decide the path first, then confirm that the UI listens only where your access model allows once security is enabled.

NiFi supports single-user, LDAP, OpenID Connect, SAML 2.0 and X.509 client certificate authentication, according to the NiFi administration guide. Kerberos is deprecated, so a new deployment should not be designed around it. Choose the provider by what your identity team already operates. Single-user access fits a lab or a single operator on a tightly controlled host. LDAP, OpenID Connect and SAML 2.0 connect NiFi logins to your directory or single sign-on service, so joiners and leavers are handled in one place. X.509 client certificates suit callers that already receive managed certificates. Confirm in the administration guide how each provider maps identities to NiFi's authorization policies, because that mapping decides who can change flows and who can only view them.

Before exposing the UI, confirm where keystores, truststores and credentials live on each platform and how they rotate. Ask whether each model delivers them as mounted files, Kubernetes Secrets, an external secrets manager or files on the VM, and who issues, renews and replaces them. Write the rotation procedure down and rehearse it on a non-production copy before go-live. Then work through the secure setup steps in the NiFi System Administrator's Guide in order, and confirm each step against the version you deploy. A security test of the exposed UI, covering login paths, certificate handling and admin settings, shows whether the exposure path and the authentication choice hold together.

Steps to stage an Apache NiFi deployment before production

These six steps take a NiFi build from a pinned release to a cluster that the operating team can run without the builders. Each step ends with a check or artifact, so the team can see what is ready and what still needs work before production.

  1. Confirm the NiFi 2.x release and Java 21

    The platform owner confirms the target release on the NiFi downloads page and pins it in the build. NiFi 2.12.0 was released on September 13, 2026, together with MiNiFi Java 2.12.0 and NiFi Registry 2.12.0. The administration guide lists Java 21 as the minimum runtime, so the JDK goes into the base image for every candidate platform. Python 3.10, 3.11 or 3.12 is needed only for the optional Python processors, which NiFi describes as beta. If you still run 1.x, plan the move to 2 as its own project, since 1.28 is the last minor release of that line. Done when the pinned version and JDK 21 build are recorded in the change record and a test node starts on each candidate platform.

  2. Choose the model against team skills

    The platform lead and the owners of existing infrastructure choose between Docker on VMs, Kubernetes and plain VMs. Each option needs a named owner for the operating system, the Java runtime, storage for the content, provenance and flowfile repositories, and cluster coordination. NiFi clusters coordinate through ZooKeeper, embedded or external, or on Kubernetes through ConfigMaps or Leases, so the choice of coordination follows from the platform. Ask the team which of these skills it already has in daily operations, since a model the team cannot patch or restore is a risk regardless of its features. Done when a short decision record names the model, the coordination method and an owner for each layer.

  3. Size the cluster with load tests

    Data engineers replay representative data from the team's own sources through the candidate flows on the chosen model. Use real volume patterns, bursts and malformed records, not synthetic samples, so the results reflect the data the cluster will carry. Measure throughput, queue back-pressure, repository disk growth and how quickly provenance data accumulates. Repeat the test with one node removed to see how the cluster behaves under reduced capacity. Done when a test report lists the node count, disk class and settings that met the agreed targets, and the team has reviewed it against the expected production growth.

  4. Configure authentication before exposing the UI

    Security engineers set up authentication before any network path to the UI exists. Without a security configuration, NiFi binds to 127.0.0.1, so the UI is reachable only through the loopback interface. NiFi supports single-user, LDAP, OpenID Connect, SAML 2.0 and X.509 client certificate authentication, while the Kerberos provider is deprecated and should not anchor a new design. The administration guide explains each provider. Done when a test user from each role can sign in through the chosen provider, and a connection attempt without valid credentials from outside the management network fails.

  5. Rehearse backup, restore and upgrade

    The operations team runs a restore of the flow definitions, parameter contexts and repositories into a clean environment, then runs an upgrade to the next 2.x release on that copy. Use the migration guidance for 2.0 to check changes that affect flows, such as the replacement of the variable registry expression language scope with the ENVIRONMENT scope and the renaming of distributed map cache components. Check that flows validate, parameters resolve and provenance queries return results. Done when the team has a runbook that records every difference found and the fix for each.

  6. Document the topology and hand over

    The architect writes the topology record: nodes, network zones, the authentication provider, where certificates and secrets live, the backup owner and the upgrade procedure. Flow definitions should be versioned in Git through the GitHub or GitLab Flow Registry Clients, because NiFi Registry is deprecated and planned for removal in NiFi 3.0. The builders then walk the operating team through a live restore and an upgrade step by step. Done when the operating team completes a restore and a node replacement on its own, and a signed handover checklist is filed with the topology record.

What buyers ask about Apache NiFi deployment cost and effort

What does it cost to run Apache NiFi on Kubernetes compared with VMs?

The license adds no cost on either path, so the difference sits in infrastructure, staff time and any outside scope. Apache NiFi is Apache-2.0 licensed and the project offers no paid edition, so you pay for the people who operate it, the compute and storage it runs on, and the monitoring around it. VM deployments usually mean more hand-managed patching and clustering setup. Kubernetes shifts effort into cluster operations, persistent volumes and cluster state configuration. Which path is cheaper depends on whether your organization already runs a mature Kubernetes platform. One-time costs include design, hardening and migration. Recurring costs include infrastructure, upgrades and on-call time. If you buy implementation or support, a quote follows from the written scope, so ask each bidder to price the same deliverables, environments and handover, and ask for the assumptions behind every figure.

How long does an Apache NiFi deployment take on Docker or Kubernetes?

The duration depends on scope, environment and team skills, so no single timeline applies to every deployment. A single-node lab differs greatly from a clustered production setup that needs identity integration, TLS, backup, monitoring and a tested upgrade path. The factors that move the schedule most are the number of environments, whether your cloud accounts, data centers or air-gapped networks need extra approvals, how many flows must be migrated or rebuilt, and how quickly your reviewers can sign off the design. Ask any implementer or internal team for a written timeline that lists the phases, the deliverables for each phase, the dependencies on your network, identity and change control teams, and the acceptance tests. DeployOpen agrees scope, deliverables and timelines in writing before work starts, so that written plan is the document to compare across bids.

Can our team run Apache NiFi without an outside partner?

Yes, if your team already has the skills to operate the platform. The work is mostly building those skills and keeping them current. The runtime needs Java 21 as a minimum, and the optional Python-based processors need Python 3.10, 3.11 or 3.12, which the administration guide describes as a beta feature. Your staff will need Linux administration, container or Kubernetes operations for the chosen deployment, and certificate and identity configuration for single-user, LDAP, OpenID Connect, SAML 2.0 or X.509 authentication. VM clusters also need ZooKeeper operations. The team also needs a plan for backup, monitoring, provenance storage sizing and upgrades. Expect the move from 1.x to 2.x to require a flow review, because NiFi 2.0 changed some variable scope and cache component names. A partner makes most sense when skills are thin or the deadline is fixed, so compare the skill gap with the cost of a fixed-scope engagement.

Is Docker appropriate for running Apache NiFi in production?

Docker can be appropriate for production, but confirm the exact setup against the vendor's container guidance before you commit. Check the current NiFi documentation for supported image settings, volume paths for the repositories, and how security settings are passed into the container. NiFi binds to 127.0.0.1 when no security configuration is provided, so a container started without TLS and identity settings is reachable only on loopback. Teams that expect a service to listen on all interfaces will find this default surprising. Confirm how your container runtime handles persistent storage for content and provenance repositories, restarts, resource limits and clustering state. A single Docker host does not provide failover on its own, so review the high availability design before using containers for a cluster. Ask your security team to review the image source, the base image update process and how secrets are injected.

Which Apache NiFi version should a new deployment start on?

Start on the NiFi 2.x line, currently NiFi 2.12.0, which the project released on September 13, 2026, because the 1.x series no longer receives maintenance. NiFi 1.28 is the last minor release of version 1, and the NiFi download page lists an end-of-support date of December 8, 2024 for 1.28.1 while strongly encouraging users to upgrade to NiFi 2. The project explains that 1.x cannot be maintained further because it depends on Jetty 9.4, Spring Framework 5.3 and AngularJS 1.8, which cannot be upgraded in that line. Before you build on 2.x, review the migration guidance for the changed variable registry expression language scope and the renamed distributed map cache components, and confirm the Java 21 runtime in your images. If you already run 1.x, plan the flow migration as its own project with a rollback path. Confirm the current patch release on the download page on the day you start.

Does Apache NiFi need ZooKeeper for clustering?

It depends on how you cluster. On VMs, NiFi clusters can coordinate through ZooKeeper, using either an embedded instance or an external ensemble that you operate. On Kubernetes, NiFi can use ConfigMaps or Leases for state and leader election, so a separate ZooKeeper ensemble is not needed on that path. The NiFi administration guide describes zero-leader clustering coordinated through ZooKeeper, so confirm the exact coordination option for the version you choose. Embedded ZooKeeper keeps the number of moving parts low but ties coordination to the NiFi nodes. An external ensemble adds its own patching, backup and quorum monitoring. If your team already runs ZooKeeper for other services, the external option may fit. Document the choice early, because changing it later affects node configuration and runbooks.

How DeployOpen scopes and runs an Apache NiFi deployment

DeployOpen plans, implements, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Apache NiFi on Docker, Kubernetes or virtual machines, the work starts with a written scope that records the runtime choice, the sizing and the cluster design. Engagements are fixed-scope, so deliverables and timelines are agreed before work starts.

How we scope

  • The written scope names the runtime, the node count and the reasons behind the choice.
  • Sizing covers NiFi nodes, storage for content and provenance repositories, and the Java 21 runtime each host needs.
  • Scope also records the authentication method, such as LDAP, OpenID Connect, SAML 2.0 or X.509 client certificates.

How we build

  • Build covers the cluster layout: ZooKeeper, embedded or external, or Kubernetes ConfigMaps and Leases for state and leader election.
  • Hardening starts with the UI, which NiFi binds to 127.0.0.1 when no security configuration is provided.
  • Flows are versioned in Git using NiFi 2 Flow Registry Clients for GitHub or GitLab, where your policy allows that.

How we hand over

  • Handover documents the version deployed, the upgrade path from NiFi 1.x to 2.x and the chosen runtime.
  • Runbooks cover backup of flow definitions, repositories and keystores, plus the restore steps your team will run.
  • Your team receives the documentation and evidence needed to review the deployment with security or compliance staff.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, separate from the initial fixed-scope build.
  • Upgrade planning covers moving off NiFi 1.x, which the project states it cannot maintain further.
  • Ask which NiFi components and optional Python processors your flows use, since they change upgrade effort.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.