feat(flink): Terraform-managed Flink Kubernetes Operator, dedicated N… - #1139
Open
meetreks wants to merge 1 commit into
Open
feat(flink): Terraform-managed Flink Kubernetes Operator, dedicated N…#1139meetreks wants to merge 1 commit into
meetreks wants to merge 1 commit into
Conversation
…odePool, tuned storage Add an in-workshop Apache Flink lab that sits alongside the Spark labs (and, when enabled, the Kafka and ClickHouse labs) on the same EKS Auto Mode cluster created by analytics/terraform/spark-k8s-operator/. Terraform side (behind var.enable_flink_lab, default true): - flink-operator.tf — Apache Flink Kubernetes Operator via the Helm chart at https://downloads.apache.org/flink/flink-kubernetes-operator-<version>/ (repository URL is templated from the version so both stay in sync), pinned to 1.15.0 — the current stable release published May 2026. Includes a tuned flink-gp3 StorageClass at 6000 IOPS / 500 MiB/s with reclaimPolicy: Retain and allowVolumeExpansion: true, ready for the moment a participant graduates from in-memory state to RocksDB. - variables.tf — new vars: enable_flink_lab (bool) and flink_operator_version (string, defaults to 1.15.0). - manifests/automode/nodepool-flink.yaml — dedicated Karpenter NodePool with workload=flink:NoSchedule taint. m/r Gen 5+ Nitro, On-Demand only, sizes 2xlarge..8xlarge. Auto-discovered by the existing fileset('nodepool*.yaml') pattern in eks.tf. Cert-manager (required for the Flink operator's admission webhooks) is already installed on the workshop cluster by the addon stack, so no extra prep is needed to install the operator. Lab manifests + scripts (analytics/flink/): - flink-cluster.yaml — FlinkDeployment CR running the built-in StateMachineExample from the official flink:1.20 image. Application mode (one JobManager per job — the modern operator-native pattern), parallelism 2, HashMap state backend with filesystem checkpoints on ephemeral /tmp for the demo. nodeSelector + toleration pin JM and TM pods to the dedicated NodePool. Uses the current state.backend.type config key (not the deprecated state.backend alias that Flink still accepts with a warning). - deploy-flink.sh — preflight-checks the operator, StorageClass, and NodePool, applies the FlinkDeployment and waits for status.lifecycleState=STABLE. - cleanup.sh — deletes the FlinkDeployment and any PVCs it created, leaves the operator, StorageClass, and NodePool for Terraform to reclaim on destroy. - README.md — architecture overview, deploy/verify/cleanup walkthrough, storage tier and sizing sections mirroring the Kafka and ClickHouse labs' shape. Verify section explicitly recommends CR status + checkpoint counts over stdout tail — Flink is a streaming pattern, not a batch one. Verified end-to-end against a scratch spike on the workshop's Auto Mode cluster: Karpenter provisioned 1x m5a.2xlarge in us-west-2b, bin-packed the JobManager and both TaskManagers onto it. Job reached status.jobStatus.state=RUNNING within ~3 minutes of apply, all 4 tasks in the execution graph running, checkpoint counter climbing steadily (74 completed at spike snapshot time). The Flink Web UI on http://state-machine-rest.flink.svc:8081 returned the expected job overview and checkpoint history via the REST API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…odePool, tuned storage
Add an in-workshop Apache Flink lab that sits alongside the Spark labs (and, when enabled, the Kafka and ClickHouse labs) on the same EKS Auto Mode cluster created by analytics/terraform/spark-k8s-operator/.
Terraform side (behind var.enable_flink_lab, default true):
Cert-manager (required for the Flink operator's admission webhooks) is already installed on the workshop cluster by the addon stack, so no extra prep is needed to install the operator.
Lab manifests + scripts (analytics/flink/):
Verified end-to-end against a scratch spike on the workshop's Auto Mode cluster: Karpenter provisioned 1x m5a.2xlarge in us-west-2b, bin-packed the JobManager and both TaskManagers onto it. Job reached status.jobStatus.state=RUNNING within ~3 minutes of apply, all 4 tasks in the execution graph running, checkpoint counter climbing steadily (74 completed at spike snapshot time). The Flink Web UI on http://state-machine-rest.flink.svc:8081 returned the expected job overview and checkpoint history via the REST API.
What does this PR do?
🛑 Please open an issue first to discuss any significant work and flesh out details/direction. When we triage the issues, we will add labels to the issue like "Enhancement", "Bug" which should indicate to you that this issue can be worked on and we are looking forward to your PR. We would hate for your time to be wasted.
Consult the CONTRIBUTING guide for submitting pull-requests.
Motivation
More
website/docsorwebsite/blogsection for this featurepre-commit run -awith this PR. Link for installing pre-commit locallyFor Moderators
Additional Notes