<p>I'm using Docker I have implemented a system to deploy environments (on a single server) based on Git branches using Traefik (*.dev.domain.com) and Docker Compose templates.</p>
<p>I like Kubernetes and I've never switched to it since I'm limited to one single server for my infrastructure. I've only used it using local installations (Docker for Windows).</p>
<p>So, my question is: does it make sense to run a Kubernetes &quot;cluster&quot; (master and nodes) on a single server to orchestrate and route containers (in place of Traefik/Rancher/Docker Compose)?</p>
<p>This use is for development and staging only for the moment, so high availability is not a prerequisite.</p>

<p>AFAIU, </p>

<p>I do not see a requirement for kubernetes unless we are doing below at least for single host using native <code>docker run</code> or <code>docker-compose</code> or <code>docker engine swarm mode</code> -    </p>

<ul>
<li>Make sure there are enough(>=2) replicas of your app in a single server and you are balancing the load across those apps docker containers. </li>
<li>If you want to go bit advanced, we should be able to scale up &amp; down dynamically (docker swarm mode supports this out of the box else use <code>jwilder nginx proxy</code>).</li>
<li>Your deployment should not cause a downtime. Make sure a single container is always healthy at any instant of time while deploying.</li>
<li>Container should auto heal(restart automatically) in case your HTTP or TCP health check fails. </li>
<li>Doing all of the above will certainly put you in a better place but single host is still a single source of failure which you got to deal with at regular intervals. </li>
<li><strong>Preferred</strong> : if possible try to start with <code>docker engine swarm mode</code> or <code>kubernetes single master</code> or  <code>minikube</code>. This will automatically take care of all the above scenarios out of the box and will also allow you to further scale up anytime by adding more nodes without changing much in your YML files for docker swarm or kubernetes. </li>
</ul>

<p>Ref -<br>
<a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="noreferrer">https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/</a>
<a href="https://docs.docker.com/engine/swarm/" rel="noreferrer">https://docs.docker.com/engine/swarm/</a></p>
