<p>Currently, we are building Docker images with an entrypoint and passing this image to a Kubernetes deployment.</p>

<p>Is there any way to pass the entrypoint directly to Kubernetes dynamically so that it starts spring boot applications?</p>

<p>What are the different ways of passing this entrypoint directly in Kubernetes?</p>

<pre><code>### Runtime image ###
FROM openjdk:8-jre-alpine

#Set working dir
WORKDIR /test

# Copy the executable JAR
COPY /*.jar /test/

# Run the app
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Djsversion=1.0 -D&lt;variable&gt;=&lt;service-1&gt; -D&lt;variable&gt;=&lt;service-2&gt;   -jar  *.jar
</code></pre>

magic
<p>You can use <code>command</code> in k8s deployment manifest:</p>

<pre><code>containers:
- name: mycontainer
  env:
  - name: NAME
    value: VALUE
  command: [ "java"]
  args: ["-jar", "-D..."]
</code></pre>
