Use a Plain Cluster

A plain IONOS cluster is ready when kubectl get pods and the operator deployment pods are up and running. If all goes well, you will have successfully deployed a Stackable cluster and used it to start three services that should now be ready for you.

Apache ZooKeeper

We can test ZooKeeper by running the ZooKeeper CLI shell. The easiest way to do this is to run the CLI shell on the pod that is running ZooKeeper.

kubectl exec -i -t simple-zk-server-primary-0 -- bin/zkCli.sh

The shell should connect automatically to the ZooKeeper server running on the pod. You can run the ls / command to see the list of znodes in the root path, which should include those created by Apache Kafka and Apache NiFi.

[zk: localhost:2181(CONNECTED) 0] ls /
[nifi, znode-17b28a7e-0d45-450b-8209-871225c6efa1, zookeeper]

For more information on how to use Apache ZooKeeper, refer to the Stackable Documentation.

Apache Kafka

To test Kafka, we will create a topic and verify if the creation is successful. First, create the topic with the following command:

kubectl exec -i -t simple-kafka-broker-brokers-0 -c kafka -- \
  bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic demo
Created topic demo.

Check if the topic is created by using the following command:

kubectl exec -i -t simple-kafka-broker-brokers-0 -c kafka -- \
  bin/kafka-topics.sh --bootstrap-server localhost:9092 --list
demo

For more information on how to use Apache Kafka, refer to the Stackable Documentation.

Apache NiFi

Apache NiFi provides a web interface; the easiest way to test it is to view it in a web browser. We first need to get the IP address and port NiFi is listening on to access the web interface. To get the IP address we need to connect to (in this case, 172.18.0.2), run:

kubectl get nodes --selector=node=quickstart-1 -o wide
NAME                STATUS   ROLES    AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE       KERNEL-VERSION      CONTAINER-RUNTIME
quickstart-worker   Ready    <none>   45m   v1.21.1   172.18.0.2    <none>        Ubuntu 21.04   5.15.0-25-generic   containerd://1.5.2

With the following command, we get the port (in this case 30247):

kubectl get svc simple-nifi
NAME          TYPE       CLUSTER-IP    EXTERNAL-IP   PORT(S)          AGE
simple-nifi   NodePort   10.43.75.25   <none>        8443:30247/TCP   49m

Browse to the address of your Kubernetes node on port 30247. Example: https://172.18.0.2:30247/nifi, and you should see the NiFi login screen.

NiFi login screen

The Apache NiFi operator automatically generates the administrator user's credentials with a random password and stores it as a Kubernetes secret for enhanced security. You can get this password for the administrator user with the following kubectl command:

kubectl get secrets nifi-admin-credentials-simple \
-o jsonpath="{.data.password}" | base64 -d && echo

Once you have these credentials, you must be able to log in and see a blank NiFi canvas.

NiFi canvas

For more information on how to use Apache NiFi, refer to the Stackable Documentation.

Note: We only install and maintain the Stackable operator tools, but you will need to install tools like ZooKeeper, Kafka, NiFi, etc., and verify if they are ready to be used in the cluster.

Last updated

Was this helpful?