<p>Consider the following things are already satisfied. <br>
1. The maria-db is running in separate pod and is pre-installed. <br>
2. When we deploy a new service it is able to connect to maria-db and create SCHEMA in it. <br></p>

<p>But the final requirement is when the service is deleted then it should cleanup the SCHEMA.
I have tried writing a job with post-delete tag.</p>

Gokul Manoj Dhoot
<p>So just a thought, you could possible do this by using a <a href="https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/" rel="nofollow noreferrer">Admission Control</a> i.e your logic could possible be along the lines of:</p>

<p><code>Delete Pod Requested --&gt; Hits Addmission Control --&gt; Addmission Controller Removes Schema --&gt; Pod Deleted</code></p>

<p>However this would be a lot of custom code and you would need a way to identify the Schema that that particular service has created in the DB.</p>
