Pedro Mázala
05/03/2023, 12:15 PMmode: standalone) to be able to use Flink in the reactive mode (scheduler-mode: reactive).
My task manager pod has my modifications (/opt/flink/usrlib/ jars) but my job manager pod seems to have the same content as the default flink image. Do you know what could lead to this?
My deployment is
apiVersion: <http://flink.apache.org/v1beta1|flink.apache.org/v1beta1>
kind: FlinkDeployment
metadata:
name: {{ template "flink-application-mode.name" . }}
spec:
image: "{{ .Values.imageRepository }}/{{ .Values.imageName }}:{{ .Values.imageTag }}"
imagePullPolicy: IfNotPresent
serviceAccount: {{ .Values.serviceAccountName }}
flinkVersion: v1_16
podTemplate:
spec:
containers:
- name: flink-main-container
env:
- name: APPLICATION_CREDENTIALS
value: /secrets/credentials.json
volumeMounts:
...
volumes:
...
flinkConfiguration:
scheduler-mode: reactive
jobManager:
replicas: 1
resource:
{{- toYaml .Values.resources.jobmanager.requests | nindent 6 }}
taskManager:
replicas: {{ .Values.replicaCount }}
resource:
{{- toYaml .Values.resources.taskmanager.requests | nindent 6 }}
mode: standalone
job:
jarURI: local:///opt/flink/usrlib/custom.jar
entryClass: {{ required "A valid .Values.jobmanager.entryClass entry required!" .Values.jobmanager.entryClass }}
parallelism: 2
upgradeMode: savepoint # last-state OR statelessGyula Fóra
05/03/2023, 12:17 PMnative mode?Gyula Fóra
05/03/2023, 12:18 PMGyula Fóra
05/03/2023, 12:19 PMnative mode currently (due to the limitations of standalone setup) , and in general I recommend that for prod over standalone + reactiveGyula Fóra
05/03/2023, 12:19 PMGyula Fóra
05/03/2023, 12:20 PMPedro Mázala
05/03/2023, 1:30 PMnative mode. What is the difference between it and standalone ?
I’m sticking to standalone because it is what I had before. But if it does sort my issues I’m happy to move 😛
Does the native mode enables manual replica changes as well? I’m sticking with reactive to be sure if I upscale/downscale taskmanagers, they do rebalance without a partition reattribution (I’m mainly using Kafka).
and in general I recommend that for prod over standalone + reactiveit means they works “the same”, am I getting this right?
due to the limitations of standalone setupWhich limitations are we talking about? Thnak you again for the support 🤝
Pedro Mázala
05/03/2023, 2:13 PMnative a single flink pod is created. Is this the expected behaviour?Gyula Fóra
05/03/2023, 2:14 PMGyula Fóra
05/03/2023, 2:15 PMPedro Mázala
05/03/2023, 2:17 PMGyula Fóra
05/03/2023, 2:18 PMPedro Mázala
05/03/2023, 2:19 PMreactive is only supported by standalone (otherwise the deployment breaks saying it only is supported by it)Gyula Fóra
05/03/2023, 2:20 PMGyula Fóra
05/03/2023, 2:20 PMPedro Mázala
05/03/2023, 2:23 PMnative mode.
Do you mind if I ping you in this thread later on?
Thank you for chiming inGyula Fóra
05/03/2023, 2:31 PMspec.job.parallelism) and the entire purpose of the operator that it knows how to create more reasources and upgrade your jobGyula Fóra
05/03/2023, 2:32 PMGyula Fóra
05/03/2023, 2:32 PMPedro Mázala
05/05/2023, 9:30 AMnative mode made the trick indeed.
I’m setting taskManager.replicas to 1 and job.parallelism to 32 (the kafka topic I’m reading has 32 partitions).
I was expecting the operator to spin up a single task manager, but it is spinning 16 instances don’t matter how I change the job.parallelism or taskManager.replicas.
Do you guys know if this is the expected behaviour indeed? And if not taskManager.replicas, how should I limit the replicas of the task manager using Flink k8s operator?
PS: I’m also posting outside of the thread because it is another problem 😄Stephen Pendleton
05/05/2023, 10:22 AMGyula Fóra
05/07/2023, 6:52 AMGyula Fóra
05/07/2023, 6:52 AMGyula Fóra
05/07/2023, 6:53 AMPedro Mázala
05/08/2023, 10:52 AMstandalone mode. The trick with the JM was this piece of code here. To prevent this behaviour, I mounted a configmap volume using a subpath inside $FLINK_HOME/usrlib/ to prevent a new volume to be mounted there.
Thank you @Gyula Fóra for the support on the native mode.