Google Flink on Kubernetes
Usage
Running flink job
|
|
Check job status and events
API
FlinkCluster
|
|
FlinkClusterSpec
|
|
FlinkClusterStatus
|
|
JobManagerSpec
JobManagerSpec 主要描述了一个 Flink > JobManager 的属性
|
|
TaskManagerSpec
|
|
JobSpec
|
|
Architecture
- The Flink Operator (including CRD and Controller) has been deployed in the cluster.
- The user runs
kubectl apply -f myjobcluster.yamlwhich sends a FlinkClusterspec to the API server. - API server validates the spec against on the CRD, then creates a FlinkClusterCR and stores it in etcd.
- A FlinkClusterADDED event is triggered by Kubernetes and dispatched to the Flink Controller.
- The Flink Controller analyzes the FlinkClusterCR, then calls the API server to create the underlying primitive resources (JobManager service, JobManager deployment, TaskManager deployment).
- The controller implements the reconciliation loop: watches the status changes of the primitive resources, updates the status field of the CR accordingly, continuously take actions to drive the observed state to the desired state when needed.
-
When JobManager deployment, JobManager service, TaskManager deployment are all ready, the controller creates a Flink job submitter which submits the job to Flink REST API through the JobManager service.
-
The JobSubmitter keeps polling the job status from the Flink REST API, finishes itself when the job is completed or failed.
-
After the job is done, the controller deletes all the resources (JM, TM) for the job, but the job cluster metadata is kept.
2023-02-01_flink-on-k8s-3
Linked Mentions