Hi Team, I have been recently trying out the flin...
# troubleshooting
n
Hi Team, I have been recently trying out the flink-k8s-operator for session mode for the auto-scaler feature. Based on the testing that we have done till date its found that - 1. We wont be able to submit an entirely different docker image to the existing cluster ( which runs on a base image) a. its because the kind FlinkSessionJob does not support any field or arg for passing the images 2. Now we were checking the possibility of passing a zipped virtual env, while submitting the job a. For this we were focusing on the argument -pyarch and were passing the blob path to the zipped env file b. The problem that we are facing here is - the flink system is not capturing the zipped env and the package that we have supplied within the new venv via the zip is said to not found
Copy code
apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
  name: flink-session
  namespace: flink-test
spec:
  image: pyflink-session-test:v1.0
  flinkVersion: v1_20
  imagePullPolicy: Always
  serviceAccount: flink
  mode: standalone
  
  flinkConfiguration:
    # All Flink runtime config keys go here
    fs.allowed-fallback-filesystems: "file"
    io.tmp.dirs: "/tmp"
    taskmanager.numberOfTaskSlots: "4"
    
    # ===== OPERATOR AUTOSCALER =====
    kubernetes.operator.job.autoscaler.enabled: "true"
    kubernetes.operator.job.autoscaler.target.utilization: "0.7"
    kubernetes.operator.job.autoscaler.target.utilization.boundary: "0.2"
    kubernetes.operator.job.autoscaler.stabilization.interval: "1m"
    kubernetes.operator.job.autoscaler.metrics.window: "5m"
    kubernetes.operator.job.autoscaler.scale-up.grace-period: "1m"
    kubernetes.operator.job.autoscaler.scale-down.grace-period: "5m"
    
  # # πŸ’‘ MOVED: jobManager must be a direct child of 'spec'
  jobManager:
    replicas: 1
    resource:
      memory: "2048m"
      cpu: 1
  taskManager:
    replicas: 2
    resource:
      # memory: "10240m"
      memory: "2048m"
      cpu: 2
Copy code
apiVersion: flink.apache.org/v1beta1
kind: FlinkSessionJob
metadata:
  name: ppe-kafka-streaming
  namespace: flink-test
spec:
  deploymentName: flink-session
  
  job:

    jarURI: /opt/flink/opt/flink-python-1.20.3.jar
    # entryClass: org.apache.flink.client.python.PythonDriver
    # args:
    #   # 1. Main PyFlink Script
    #   - "--python"  # Changed from -py
    #   - "/opt/flink/usrlib/streaming_test.py"
      
    #   # 2. Python Archives
    #   - "--pyArchives"  # Changed from -pyarch
    #   - "blob_path#flink_venv"
      
    #   # 3. Python Executable
    #   - "-pyexec"  # This is correct!
    #   - "flink_venv/bin/python" 

    args:
    - "-py"
    - "/opt/flink/usrlib/streaming_test.py"
    - "-pyarch"
    - "blob_path#flink_venv"
    - "-pyexec"
    - "flink_venv/bin/python"
    
    parallelism: 2
Request for your help if you have faced and tackled a similar issue. #C065944F9M2 #C03G7LJTS2G #C03GV7L3G2C