<p>I would like to know, what's the best practice to handle configs for a Java App in Kubernetes? 
I have seen some examples with System variables in the yaml file. Or is there a "better" approach with java property files?</p>

<p>Is there also a way to let different instances of a pod use different configurations?</p>

<p>Thanks in advance!
Mananana</p>

<p>There is no canonical solution, it depends from case to case</p>

<p>If you have one or a few parameters passing them as environment variables would be ok.</p>

<p>In case if you have many parameters (lets say you have different set of parameters for production and for test environment) it is more convenient to gather them into property file and pass the property file name during application startup. It could be done either using env variable or just as an argument to the startup command.</p>

<p>Property files (or profiles) are also well supported with the popular frameworks, like spring boot, they allow to pass a profile during startup. In this case kubernates yaml could look somehow like this:</p>

<pre><code>env:
  - name: SPRING_PROFILES_ACTIVE
    value: production
command: [ "bash", "-c", "java -jar App.jar"]
</code></pre>
