<p>As the title says, I need to automate the deployment of an application running on a Payara-Full Pod.</p>
<p>For now I've manually deployed the .war file by copying it inside the Pod (through the <code>kubectl cp</code> command), and then logging inside the pod console through <code>kubectl exec --stdin --tty &lt;pod-name&gt; -- /bin/bash</code>.</p>
<p>Once I'm logged in, I access the Payara console by running the command <code>asadmin</code> and logging in, and then I manually deploy the .war through <code>deploy &lt;filename&gt;.war</code>.</p>
<p>How can I automate this process?</p>
<p>I thought of using a custom Payara image or an InitContainer, but I don't know what is the best practice for this type of deployment.</p>

shaki
<p>You can merely copy your .war to payara autodeploy directory inside container (<code>${PAYARA_HOME}/glassfish/domins/[domain you use]/autodeploy</code>) and restart service. You web-app will be deployed automatically on domain restart.</p>
