<p>My organization manages systems where each client is provisioned a VPS and then their tech stack is spun up on that system via Docker Compose.</p>
<p>Data is stored on-system, using Docker Compose volumes. None of the fancy named storage - just good old direct path volumes.</p>
<p>While this solution is workable, the problem is that this method does not scale. We can always give the VPS more CPU/Memory but that does not fix the underlying issues.</p>
<p>Staging / development environments must be brought up manually - and there is no service redundancy. Hot swapping is impossible with our current system.</p>
<p>Kubernetes has been pitched to me to solve our problems, but honestly I have no idea where to begin - most of the documentation is obtuse and I have failed to find somebody with our particular predicament.</p>
<p>The end goal would be to have just a few high-spec machines running Kubernetes - with redundancy, staging, and the ability to spin up new clients as necessary (without having to provision additional machines or external IPs).</p>
<p>What specific tools would my organization need to use to achieve this goal?</p>
<p>Are there any tools that would allow us to bring over our existing Docker Compose stacks into Kubernetes?</p>

Hank Jordan
<p>Where to begin: given what you're telling us, I would first look into my options to implement some SDS.</p>
<p>You're currently using local volumes, which you probably won't be able to do with Kubernetes - or at least shouldn't, if you don't want to bind your containers to a unique node.</p>
<p>The most easy way - while not necessarily the one I would recommend - would be to use some NFS servers. Even better: with some DRBD, pacemaker / corosync, using a VIP for failover --  or the FreeBSD way: hastd, carp, ifstated, maybe some zfs. You would probably have to deploy distinct systems scaling your Kubernetes cluster, distributing IOs, ... a single NFS server doesn't last long without its load going over 50 and iowaits spiking ...</p>
<p>A better way would be to look into actual SDS solutions. One I could recommend is Ceph, though there's a lot of new solutions I'm less familiar with ... and there's GlusterFS I would definitely avoid. An easy way to deploy Ceph would be to use ceph-ansible.</p>
<p>Given what corporate hardware you have at your disposal, maybe you would have some NetApp or equivalent, something that can implement NFS shares, and/or some iSCSI gateways.</p>
<p>Now, those are all solutions you could run on the side, although note that you would also find &quot;CNS&quot; solutions (container native), which are meant to be deployed on top of Kubernetes. Ceph clusters can be managed using Rook. These can be interesting, though in terms of maintenance and operations, it requires good knowledge of both the solution you operate and kubernetes/containers in general: troubleshooting issues and fixing outages may not be as easy as a good-old bare-meta/VM setup. For a first Kubernetes experience: I would refrain myself. When you'll feel comfortable enough, go ahead.</p>
<p>In any cases, another critical consideration before deploying your cluster would be the network that would host your installation. Consider that Kubernetes should not be directly deployed on public instances: you would probably want to have some private VLAN, maybe an internal DNS, a local resitry (could be Kubernetes-hosted), or other tools such as an LDAP server, some SMTP relay, HTTP cache/proxies, loadbalancers to put in front of your API, ...</p>
<p>Once you've made up your mind regarding those issues, you can look into deploying a Kubernetes cluster using tools such as Kubespray (ansible) or Kops (uses Terraform, and thus requires some cloud API, eg: aws). Both projects are part of the Kubernetes project and maintained by its community. Kubespray would cover all scenarios (IAAS &amp; bare-metal), integrate with popular SDS out of the box, can ship with various ingress controllers, ... overall offers good defaults, and lots of variables to customize your installation.</p>
<p>Start with a 3-master 2-workers cluster, make sure the resulting cluster matches what you would expect.</p>
<p>Before going to prod, take your time to properly translate your existing configurations. Sometime, refactoring code or images could be worth it.</p>
<p>Going to prod, consider adding a group of &quot;infra&quot; nodes: if you want to host some logging solution or other internal services that are somewhat critical to users and shouldn't suffer outages caused by end-users workloads (eg: ingress routers, monitoring, logging, integrated registry, ...).</p>
<ul>
<li>Kubespray: <a href="https://github.com/kubernetes-sigs/kubespray/" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/kubespray/</a></li>
<li>Kops: <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">https://github.com/kubernetes/kops</a></li>
<li>Ceph: <a href="https://ceph.com/en/discover/" rel="nofollow noreferrer">https://ceph.com/en/discover/</a></li>
<li>Ceph Ansible: <a href="https://github.com/ceph/ceph-ansible" rel="nofollow noreferrer">https://github.com/ceph/ceph-ansible</a></li>
<li>Rook (Ceph CNS): <a href="https://github.com/rook/rook" rel="nofollow noreferrer">https://github.com/rook/rook</a></li>
</ul>
