<p>I just upgrade the Flink from version 1.10 to 1.11. In 1.11, Flink provides new features that users can deploy the job in Application Mode on Kubernetes.
<a href="https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/deployment/kubernetes.html#deploy-session-cluster" rel="nofollow noreferrer">https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/deployment/kubernetes.html#deploy-session-cluster</a></p>
<p>In V1.10, we start the Flink K8s cluster and then submit the job to Flink by run</p>
<pre><code>exec ./bin/flink run \
  -d \
  /streakerflink_deploy.jar \
    --arg1 blablabla
    --arg2 blablabla
    --arg3 blablabla
    ...
</code></pre>
<p>We pass the java arguments through this command.</p>
<p>But, in V1.11, if we run Application mode, we don't need to run the <code>flink run</code> command above. I am wondering how do we pass the arguments to Flink job in Application mode (aka Job Cluster)?</p>
<p>Any help will be appreciated!</p>

<p>Since you are using helm chart to start the Flink cluster on Kubernetes(aka K8s), i assume you are talking about the standalone K8s mode. Actually, the Application mode is very similar to the job cluster in 1.10 and before.
So you could set the job arguments in the <code>args</code> field in the <code>jobmanager-job.yaml</code> just like following.</p>
<pre><code>...
args: [&quot;standalone-job&quot;, &quot;--job-classname&quot;, &quot;org.apache.flink.streaming.examples.join.WindowJoin&quot;, &quot;--windowSize&quot;, &quot;3000&quot;, &quot;--rate&quot;, &quot;100&quot;]
...
</code></pre>
<p>If you really mean the native K8s mode, then it could be directly added after the <code>flink run-application</code> command.</p>
<pre><code>$ ./bin/flink run-application -p 8 -t kubernetes-application \
  -Dkubernetes.cluster-id=&lt;ClusterId&gt; \
  -Dtaskmanager.memory.process.size=4096m \
  -Dkubernetes.taskmanager.cpu=2 \
  -Dtaskmanager.numberOfTaskSlots=4 \
  -Dkubernetes.container.image=&lt;CustomImageName&gt; \
  local:///opt/flink/examples/streaming/WindowJoin.jar \
  --windowSize 3000 --rate 100
</code></pre>
<p>Note:
Please keep in mind that the key difference between standalone K8s and native K8s mode is the dynamic resource allocation. In native mode, we have an embedded K8s client, so Flink JobManager could allocate/release TaskManager pods on demands. Currently, native mode could only be used in Flink commands(<code>kubernetes-session.sh</code>, <code>flink run-application</code>).</p>
