<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>unless java can do that natively kubernetes wont do that for you. so you need an init script that would read env. variables and replace tokens in your server.xml. or make your app do that somehow.</p>

<p>kubernetes cant do token replacement.</p>
