flink-session-cluster
Helm chartv0.1.16
Helm Chart for running Flink in session-cluster mode
About this chart
Flink session cluster
Running locally
prerequisites
- docker
- minikube -> https://v1-18.docs.kubernetes.io/docs/tasks/tools/install-minikube/
- note: I used the docker driver
- kubectl -> https://kubernetes.io/docs/tasks/tools/install-kubectl/
- helm -> https://helm.sh/docs/intro/quickstart/
- blubber -> https://wikitech.wikimedia.org/wiki/Blubber/Download
start minikube
minikube start
build docker image locally
- go to flink-rdf-streaming-updater (generic flink image yet to be created) directory
- use minikube as docker host:
eval $(minikube docker-env) - run blubber and create local image:
blubber .pipeline/blubber.yaml production | docker build --tag docker-registry.wikimedia.org/wikimedia/wikidata-query-flink-rdf-streaming-updater:latest --file - .
run flink session cluster chart
- cd deployment-charts/charts
- helm install my-flink-cluster flink-session-cluster
useful commands
kubectl get pods-> shows running pods in k8 clusterkubectl describe pods-> shows more detailed information about podskubectl logs -f -l component=jobmanager-> follow the logs for the jobmanagerkubectl logs -f -l component=taskmanager-> follow the logs for the taskmanagerskubectl get svc -l component=flink-session-cluster-ui-> to get the exposed service to the flink UI and REST endpointkubectl get configmap -l type=flink-native-kubernetes -o yaml-> get Flink H/A configmapskubectl configmap -l type=flink-native-kubernetes -o yaml-> get Flink H/A configmaps
tear down
- remove flink installation: helm uninstall flink
- delete minikube cluster:
minikube delete
Deploy flink-session-cluster with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has flink-session-cluster on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartflink-session-cluster is pinned at v0.1.16 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply