Home > Back-end >  Setting up Nifi for use with Kafa in Kubernetes using Helm in a VirtualBox
Setting up Nifi for use with Kafa in Kubernetes using Helm in a VirtualBox

Time:02-02

I need to set up NiFi in Kubernetes (microk8s), in a VM (Ubuntu, using VirtualBox) using a helm chart. The end goal is to have two-way communication with Kafka, which is also already deployed in Kubernetes.

I have found a helm chart for NiFi available through Cetic here. Kafka is already set up to allow external access through a NodePort, so my assumption is that I should do the same for NiFi (at least for simplicity's sake), though any alternative solution is welcome.

From the documentation, there is NodePort access optionality:

NodePort: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting NodeIP:NodePort.

Additionally, the documentation states (paraphrasing):

service.type defaults to NodePort

However, this does not appear to be true for the helm file, given that the default value in the chart's values.yaml file has service.type=ClusterIP.

I have very little experience with any of these technologies, so my question is, how do I actually set up the NiFi helm chart YAML file to allow two-way communication (presumably via NodePorts)? Is it as simple as "requesting NodeIP:NodePort", and if so, how do I do this?

UPDATE

I attempted JM Robles's approach (which does not use helm), but the API version used for Ingress is out-of-date and I haven't been able to figure out how to fix it.

I also tried GetInData's approach, but the helm commands provided result in: Error: unknown command "nifi" for "helm".

CodePudding user response:

I found an answer, for any faced with a similar problem. As of late January 2023, the following can be used to set up NiFi as described in the question:

helm remo add cetic https://cetic.github.io/helm-charts
helm repo update
helm install -n <namespace> --set persistence.enabled=True --set service.type=NodePort --set properties.sensitiveKey=<key you want> --set auth.singleUser.username=<your username> --set auth.singleUser.password=<password you select, must be at least 12 characters> nifi cetic/nifi
  • Related