<p>Is this a good idea to host java jar files on ConfigMap when we want to extend a JVM classpath?</p>

<p>Normally the application itself is baked into docker image but extending it(via plugin jar etc.) requires either attaching volume, copying the jar file to the volume and and restart the pod but you need a volume to do that. The other option is to put directly the jar into ConfigMap as binary object and restart the pod. The latter seems easier and faster and it should work for <a href="https://github.com/kubernetes/kubernetes/issues/19781#issuecomment-172553264" rel="noreferrer">small size</a> jar files.</p>

<p>It looks like a workaround to put jar into the config maps. Try another solution. </p>

<p>Why can not you pack this dependency on docker image? </p>

<p>You can use a init container as pointed by @reegnz</p>

<p>The docs of this feature are here: </p>

<p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-initialization/" rel="noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-initialization/</a></p>
