<p>I have a Kubernetes deployment and I want to insert some conf parameters end of file while creating the pod. How can I do that ? It shouldn't restart the pod.</p>

James001
<p>You can either use the <code>command</code> directive to override the entrypoint of the container, or mount in the conf as a configmap, then edit that.</p>
<p>Here's an example of overriding the entrypoint -- more reading available <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/" rel="nofollow noreferrer">here</a></p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp-deployment
  labels:
    app: myapp
spec:
  replicas: 3
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp
        image: myapp:latest
        command: ['/bin/bash -c &quot;echo newvkey=newval &gt;/etc/myconf.conf &amp;&amp; ./entrypoint.sh&quot;']
        ports:
        - containerPort: 80
</code></pre>
