<p>I tried to <a href="https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/resource-providers/standalone/docker/#further-customization" rel="nofollow noreferrer">override the container entry point</a> of a Flink application in a Dockerfile, but it looks like that the <a href="https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/" rel="nofollow noreferrer">Apache Flink kubernetes operator</a> ignores it.</p>
<p>The Dockerfile is the following:</p>
<pre><code>FROM flink:1.14.2-scala_2.12-java11

ENV FLINK_HOME=/opt/flink

COPY custom-docker-entrypoint.sh /
RUN chmod a+x /custom-docker-entrypoint.sh
COPY --chown=flink:flink --from=build /target/*.jar /opt/flink/flink-web-upload/

ENTRYPOINT [&quot;/custom-docker-entrypoint.sh&quot;]
EXPOSE 6123 8081
CMD [&quot;help&quot;]
</code></pre>
<p>The definition of the FlinkDeployment uses the new image:</p>
<pre><code>apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
  name: flink-example
  namespace: default
spec:
  image: &quot;flink-example:0.1.0&quot;
#...
</code></pre>
<p>In the description of the pod</p>
<pre><code>kubectl describe pod flink-example
</code></pre>
<p>I see the following output:</p>
<pre><code>Containers:
  flink-main-container:
    Command:
      /docker-entrypoint.sh
</code></pre>
<p>I also tried to define the <code>custom-docker-entrypoint.sh</code> in the main container's <strong>command</strong>:</p>
<pre><code>apiVersion: flink.apache.org/v1beta1
kind: FlinkDeployment
metadata:
  name: flink-example
  namespace: default
spec:
  flinkVersion: v1_14
  image: &quot;flink-example:0.1.0&quot;
  podTemplate:
    apiVersion: v1
    kind: Pod
    metadata:
      name: pod-template
    spec:
      containers:
        - name: flink-main-container
#          command: [ 'sh','-c','/custom-docker-entrypoint.sh' ]
          command: [ &quot;/custom-docker-entrypoint.sh&quot; ]
</code></pre>
<p>Thank you.</p>

<p>You can overwrite it via:</p>
<pre class="lang-yaml prettyprint-override"><code>  flinkConfiguration:
    kubernetes.entry.path: &quot;/custom-docker-entrypoint.sh&quot;
</code></pre>
<p>The Operator (by default) uses Flink's native Kubernetes integration. See: <a href="https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/#kubernetes-entry-path" rel="nofollow noreferrer">https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/#kubernetes-entry-path</a></p>
