flink kubernetes Operator 高可用性与作业管理器的关系

问题描述 投票:0回答:0

我正在尝试将 flink kubernetes 运算符与本地 minikube kubernetes 一起使用。我从 flink 高可用性文档中了解到,Job Manager 副本是我们关心的主要问题。但是,当我覆盖 flink Operator 安装的 helm 图表值时,我得到 x 数量的 flink-kubernetes-operator 副本而不是作业管理器。

Flink Operator 工具感觉它抽象了很多东西,但我找不到主题的答案,例如如何在不同的 Pod 中部署复制或 Operator 本身隐式地执行此操作。

在上述场景中,flink kubernetes 运算符的作用是什么?

提前致谢。

kubectl get all
NAME                                             READY   STATUS    RESTARTS   AGE
pod/flink-kubernetes-operator-64478576b7-5vm4g   1/1     Running   0          8m22s
pod/flink-kubernetes-operator-64478576b7-lpzr7   1/1     Running   0          84m
pod/flink-kubernetes-operator-64478576b7-mk5vr   1/1     Running   0          84m
pod/rule-calculation-engine-5b8474c99b-ln2gb     1/1     Running   0          8m22s
pod/rule-calculation-engine-taskmanager-1-1      1/1     Running   0          7m59s

NAME                                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)             AGE
service/rule-calculation-engine        ClusterIP   None            <none>        6123/TCP,6124/TCP   8m22s
service/rule-calculation-engine-rest   ClusterIP   10.102.22.170   <none>        8081/TCP            8m22s

NAME                                        READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/flink-kubernetes-operator   3/3     3            3           84m
deployment.apps/rule-calculation-engine     1/1     1            1           8m22s

NAME                                                   DESIRED   CURRENT   READY   AGE
replicaset.apps/flink-kubernetes-operator-64478576b7   3         3         3       84m
replicaset.apps/rule-calculation-engine-5b8474c99b     1         1         1       8m22s

FlinkDeployment yaml

apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
  name: rule-calculation-engine
  namespace: flink
spec:
  image: rule-calculation:v1.0.0
  imagePullPolicy: Never

  flinkVersion: v1_17

  serviceAccount: flink
  jobManager:
    resource:
      memory: "1024m"
      cpu: 0.5
  taskManager:
    resource:
      memory: "2048m"
      cpu: 1
  job:
    jarURI: local:///opt/flink/job.jar
    parallelism: 1
    upgradeMode: stateless
    state: running

values.yaml 覆盖操作员安装,据称它会覆盖操作员和作业/任务管理器的配置

.............
# Replicas must be 1 unless operator leader election is configured
replicas: 3
.............
defaultConfiguration:
  flink-conf.yaml: |+
    # Flink Config Overrides
   
  kubernetes.operator.leader-election.enabled: true
  kubernetes.operator.leader-election.lease-name: flink-operator-lease
  kubernetes.cluster-id: k8s-ha-app
  high-availability.type: kubernetes
  high-availability.storageDir: local:///opt/flink
.............

另外,如何知道哪些键值可用于覆盖这些 yaml 文件?老实说,我只能通过示例配置文件找到这些,而不是通过官方文档说明这个舵图具有这些可用的键。

kubernetes apache-flink kubernetes-helm
© www.soinside.com 2019 - 2024. All rights reserved.