<p>I want to know if there is any solution in order to submit a flink job to a kubernetes cluster.</p>
<p>In the jobmanager deployment file after startup I tried to add a command option to my jobmanager pod but I realized that the command I passed override the image entrypoint.</p>
<p>So I want to know if there is a solution to do so?</p>

mark dev
<p>Yes, if you provide a <code>command</code> and/or its <code>args</code>, it overrides the original image's <code>Entrypoint</code> and/or <code>Cmd</code>. If you want to know how exactly it happens, please refer to <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes" rel="nofollow noreferrer">this fragment of the official kubernetes docs</a>.</p>
<p>If you want to run some additional command immediatelly after your <code>Pod</code> startup, you can do it with a <code>postStart</code> handler, which usage is presented in <a href="https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/#define-poststart-and-prestop-handlers" rel="nofollow noreferrer">this example</a>:</p>
<blockquote>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: lifecycle-demo
spec:
  containers:
  - name: lifecycle-demo-container
    image: nginx
    lifecycle:
      postStart:
        exec:
          command: [&quot;/bin/sh&quot;, &quot;-c&quot;, &quot;echo Hello from the postStart handler &gt; /usr/share/message&quot;]
      preStop:
        exec:
          command: [&quot;/bin/sh&quot;,&quot;-c&quot;,&quot;nginx -s quit; while killall -0 nginx; do sleep 1; done&quot;]
</code></pre>
</blockquote>
