<p>I have a 3rd party docker image that I want to use (<a href="https://github.com/coreos/dex/releases/tag/v2.10.0" rel="nofollow noreferrer">https://github.com/coreos/dex/releases/tag/v2.10.0</a>). I need to inject some customisation into the pod (CSS stylesheet and PNG images). </p>

<p>I haven't found a suitable way to do this yet. Configmap binaryData is not available before v1.10 (or 9, can't remember off the top of my head). I could create a new image and <code>COPY</code> the PNG files into the image, but I don't want the overhead of maintaining this new image - far safer to just use the provided image. </p>

<p>Is there an easy way of injecting these 2/3 files I need into the pod I create?</p>

agentgonzo
<p>One way would be to mount 1 or more volumes into the desired locations within the pod, seemingly <code>/web/static</code>. This however would overwrite the entire directly so you would need to supply all the files not just those you wish to overwrite.</p>

<p>Example:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
  - image: dex:2.10.0
    name: dex
    volumeMounts:
    - mountPath: /web/static # the mount location within the container
      name: dex-volume
  volumes:
  - name: dex-volume
    hostPath:
      path: /destination/on/K8s/node # path on host machine
</code></pre>

<p>There are a number of types of storage types for different cloud providers so take a look at <a href="https://kubernetes.io/docs/concepts/storage/volumes/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/</a> and see if theres something a little more specific to your environment rather than storing on disk.</p>

<p>For what it's worth, creating your own image would probably be the simplest solution.</p>
