First steps
After going through the Installation section and having installed all the operators, you deploy a NiFi cluster and the required dependencies. Afterward you can verify that it works by querying the REST API.
Setup
We are going to install a NiFi cluster by applying a manifest file. The operators create the resources according to the manifests.
The NiFi cluster requires authentication. Create a set of credentials for this purpose:
kubectl apply -f - <<EOF
---
apiVersion: v1
kind: Secret
metadata:
name: simple-admin-credentials
stringData:
admin: admin
---
apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
name: simple-nifi-users
spec:
provider:
static:
userCredentialsSecret:
name: simple-admin-credentials
EOF
Afterwards create a NiFi instance:
kubectl apply -f - <<EOF
---
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: simple-nifi
spec:
image:
productVersion: 2.4.0
clusterConfig:
authentication:
- authenticationClass: simple-nifi-users
sensitiveProperties:
keySecret: nifi-sensitive-property-key
autoGenerate: true
nodes:
roleConfig:
listenerClass: external-unstable
roleGroups:
default:
replicas: 1
EOF
Verify that it works
First, make sure all pods are ready:
kubectl wait --for=condition=available --timeout=20m nificluster/simple-nifi
Then make sure the StatefulSets are ready:
kubectl get statefulset
The output should show all pods ready:
NAME READY AGE
simple-nifi-node-default 2/2 5m
simple-zk-server-default 3/3 7m
Congratulations! You successfully created your first NiFi cluster!
Access the NiFi web interface
You can retrieve the URL for the NiFi cluster web interface via stackablectl
or kubectl
.
stackablectl
Use the service command of stackablectl
to get a list of all available endpoints:
stackablectl stacklet list
which should return something like this:
PRODUCT NAME NAMESPACE ENDPOINTS CONDITIONS nifi simple-nifi default node-https https://172.18.0.2:30528 Available, Reconciling, Running
You can also use the json
output and parse the endpoint:
nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]')
Then connect to https://172.18.0.2:30528/nifi
and you should see the NiFi web login. After providing the username admin
and password admin
you are redirected to the NiFi web interface.

Via kubectl
You can also extract the endpoint from the Listener status via kubectl
:
nifi_url=$(kubectl get listener simple-nifi-node -o 'jsonpath=https://{.status.ingressAddresses[0].address}:{.status.ingressAddresses[0].ports.https}') && \
echo "NiFi URL: $nifi_url"
should output a URL to connect to the NiFi web interface:
NiFi URL: https://172.18.0.2:30528
Then connect to https://172.18.0.2:30528/nifi
and you should see the NiFi web login. After providing the username admin
and password admin
you are redirected to the NiFi web interface.
What’s next
Have a look at the Usage guide page to find out more about the features of the NiFi Operator.