This example demonstrates deploying Apache Flink StateFun
, together with a single remote function to kubernetes
.
All the components are already pre-configured and contains all the resource definitions ready to be applied with kubectl
. All the resources are deployed to a dedicated namespace - statefun
.
The following components will be installed:
minikube config set memory 5120 minikube start minikube ssh 'sudo ip link set docker0 promisc on' eval $(minikube -p minikube docker-env)
statefun
namespace.kubectl create -f 00-namespace kubectl config set-context --current --namespace statefun
kubectl create -f 01-minio kubectl create -f 02-kafka
NOTE: please make sure that you've run eval $(minikube -p minikube docker-env)
In your current terminal session.
cd 03-functions make image make service cd ..
kubectl create -f 04-statefun
kubectl port-forward svc/statefun-master-rest 8081:8081 -n statefun
Now you can explore Apache Flink's WEB interface:
http://localhost:8081/#/overview
In one terminal run:
bin/show-function-logs.sh
And in another run:
bin/invoke-function.sh
When prompted with:
Please enter a target id:
try writing your name.
Please enter a message:
Write any message you would like.
In the previous console you will see: Hello from <name>: you wrote <message>!
kubectl delete namespace statefun minikube stop