<p>I am using Kubernetes for a number of microservices/apps but...</p>
<p>...if I want to setup, e.g. 20 independent Linux mail servers, all with their own public IPs but otherwise largely identical configuration, then Docker is a good fit (for consistent builds/deployments and also dealing with dead containers/restarts) but it doesn't seem right to create 20 deployments, 20 LB services etc. to achieve this. This would also clutter up my CI/CD tool with 20 projects for the 20 deployments since they wouldn't just be 20 instances of the same thing.</p>
<p>What do people think is a good tool for consistent server deployments, so that if I wanted to increase from e.g. 20 to 30 servers, I could automate it as much as possible.</p>
<p>(We could use Azure or Amazon as well as Kubernetes so we have some flexibility)</p>

Luke Briner
<p>For starters, you can get away with a single Helm chart that captures the essence of your mail server deployment and then a single <code>values.yaml</code> per instance. Deployment is just running <code>helm upgrade --install</code> in a <code>for</code> loop.</p>
<p>If you need more, you can look at creating an Operator for your own use:</p>
<ul>
<li>a <code>MailServer</code> Custom Resource Definition (CRD) that captures all the configuration about a mail server instance</li>
<li>an Operator that reacts to CRUD operations on <code>MailServer</code> resources and respectively deploys, redeploys or undeploys. The initial implementation can simply be a small Kopf daemon managing the Helm chart from above.</li>
</ul>
