Hello :wave: I have a question about Flink Kuberne...
# troubleshooting
e
Hello 👋 I have a question about Flink Kubernetes Operator: I do know that we can customize resources for the jobmanager and the taskmanager like this =>
Copy code
jobManager:
    resource:
      memory: "2G"
      cpu: 1
  taskManager:
    resource:
      memory: "4G"
      cpu: 1
But can we customize the request and the limit? In this example, both are filled with the same value.
Ñ”
Do this via
jobManager.podTemplate
/
taskManager.podTemplate
AFAIK, the mentioned params are affecting JVM arguments
e
you mean something like that ? =>
Copy code
jobManager:
    resource:
      cpu: 1
      memory: 2G
    podTemplate:
      spec:
        containers:
          - name: flink-main-container
            resources:
              limits:
                cpu: '1'
                memory: 4Gi
              requests:
                cpu: '1'
                memory: 2Gi
I've tried this and it doesn't seem to change the situation
Ñ”
try just
spec.podTemplate
i am using it for cutomizing pods - it worked for me
I am using flink operator 1.8.0
e
Something like that ?
Copy code
apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
  name: XXXX
  namespace: flink-operator
spec:
  jobManager:
    resource:
      memory: "2G"
      cpu: 1
  taskManager:
    resource:
      memory: "4G"
      cpu: 1
  podTemplate:
    metadata:
    spec:
      containers:
        - name: flink-main-container
          resources:
            limits:
              cpu: '1'
              memory: 8Gi
            requests:
              cpu: '1'
              memory: 4Gi
  job:
    jarURI: XXXX
    entryClass: XXX
    parallelism: 1
    upgradeMode: last-state
    state: running
Ñ”
yes
Here's my sample
Copy code
apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
spec:
  image: flink:1.19.0-java17
  serviceAccount: flink
  podTemplate:
    spec:
      imagePullSecrets:
        - name: ghcr
      volumes:
        - name: dwh
          secret:
            secretName: dwh
e
I don't have the same thing as you, maybe because it's been updated and didn't start at first like this, I'll try
p
You can set the limits using
kubernetes.jobmanager.cpu.limit-factor
and
kubernetes.taskmanager.cpu.limit-factor
in the flink configuration.