<p>I need to set up variables inside my server.xml but this at the time of creating my pod, I did this and it did not work</p>

<p><strong>server.xml</strong></p>

<pre><code>&lt;Realm className="org.apache.catalina.realm.JDBCRealm" connectionURL="${db_url}" driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver" roleNameCol="role" userCredCol="password" userNameCol="login" userRoleTable="userRole" userTable="v_login"/&gt;
</code></pre>

<p>and my pod.yaml</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
 name: dbtest
spec:
 containers:
 - name: dbtest-container
   image: xxx.azurecr.io/iafoxteste:latest
   ports:
     - containerPort: 8080
   env: 
     - name: db_url
       value: "jdbc:sqlserver://xxx.database.windows.net:1433;database=xxx;user=xxx@iafox;password=xxxx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;"
</code></pre>

Bruno Luis
<p>As it was mentioned kubernetes doesn't do it for you.  In order to pass that value to tomcat you need to add db_url as java system property ex. -db_url="jdbc:sqlserver://xxx.database.windows.net:1433;database=xxx;user=xxx@iafox;password=xxxx;encrypt=true;....".  Then you need to have a starter shell scripts that gets this value from environment variable and pass that to your CATALINA_OPTS.
Check this stackoverflow question <a href="https://stackoverflow.com/questions/7054972/java-system-properties-and-environment-variables">Java system properties and environment variables</a></p>
