<p>I am trying to perform a flink job, using Flink Operator (https://github:com/apache/flink-kubernetes-operator) on k8s, that using uses a connection to Azure Blob Storage described here: <a href="https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/filesystems/azure/" rel="nofollow noreferrer">https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/filesystems/azure/</a></p>
<p>Following the guideline I need to copy the jar file flink-azure-fs-hadoop-1.15.0.jar from one directory to another.</p>
<p>I have already tried to do it via podTemplate and command functionality, but unfortunately it does not work, and the file does not appear in the destination directory.</p>
<p>Can you guide me on how to do it properly?
Below you can find my FlinkDeployment file.</p>
<pre><code>apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
  namespace: flink
  name: basic-example
spec:
  image: flink:1.15
  flinkVersion: v1_15
  flinkConfiguration:
    taskmanager.numberOfTaskSlots: &quot;2&quot;
  serviceAccount: flink
  podTemplate:
    apiVersion: v1
    kind: Pod
    metadata:
      name: pod-template
    spec:
      serviceAccount: flink
      containers:
        - name: flink-main-container
          volumeMounts:
            - mountPath: /opt/flink/data
              name: flink-data
#          command:
#            - &quot;touch&quot;
#            - &quot;/tmp/test.txt&quot;
      volumes:
        - name: flink-data
          emptyDir: { }

  jobManager:
    resource:
      memory: &quot;2048m&quot;
      cpu: 1
    podTemplate:
      apiVersion: v1
      kind: Pod
      metadata:
        name: job-manager-pod-template
      spec:
        initContainers:
          - name: fetch-jar
            image: cirrusci/wget
            volumeMounts:
              - mountPath: /opt/flink/data
                name: flink-data
            command:
            - &quot;wget&quot;
            - &quot;LINK_TO_CUSTOM_JAR_FILE_ON_AZURE_BLOB_STORAGE&quot;
            - &quot;-O&quot;
            - &quot;/opt/flink/data/test.jar&quot;
        containers:
          - name: flink-main-container
            command:
              - &quot;touch&quot;
              - &quot;/tmp/test.txt&quot;
  taskManager:
    resource:
      memory: &quot;2048m&quot;
      cpu: 1
  job:
    jarURI: local:///opt/flink/data/test.jar
    parallelism: 2
    upgradeMode: stateless
    state: running
  ingress:
    template: &quot;CUSTOM_LINK_TO_AZURE&quot;
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt
      kubernetes.io/ingress.allow-http: 'false'
      traefik.ingress.kubernetes.io/router.entrypoints: websecure
      traefik.ingress.kubernetes.io/router.tls: 'true'
      traefik.ingress.kubernetes.io/router.tls.options: default
</code></pre>

Jakub Socha
<p>Since you are using the stock Flink 1.15 image this Azure filesystem plugin comes built-in. You can enable it via setting the <code>ENABLE_BUILT_IN_PLUGINS</code> environment variable.</p>
<pre><code>spec:
  podTemplate:
      containers:
        # Do not change the main container name
        - name: flink-main-container
          env:
            - name: ENABLE_BUILT_IN_PLUGINS
              value: flink-azure-fs-hadoop-1.15.0.jar
</code></pre>
<p><a href="https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/standalone/docker/#using-filesystem-plugins" rel="nofollow noreferrer">https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/standalone/docker/#using-filesystem-plugins</a></p>
