Why I'm leaving Kubernetes for Swarm
There&#x27;s a lot of misleading information here. Pretty much all of his examples use a more difficult solution than needed, making Kubernetes seem like it&#x27;s a lot more fiddly to use.<p>&gt; &quot;one docker-compose.yml file ... as opposed to the countless files covering everything&quot;<p>The author seems to think that a Kubernetes manifest can only contain a single declaration. You can actually stuff as many declarations as you want into a single YAML file, like so (and you should!):<p><pre><code>   apiVersion: extensions&#x2F;v1beta1
   kind: Deployment
   [...]
   ---
   apiVersion: v1
   kind: ConfigMap
   [...]
   ---
   apiVersion: v1
   kind: Service
   [...]
</code></pre>
Put it in myapp.yaml and do &quot;kubectl apply -f myapp.yaml&quot;. Exactly the same as Docker Compose.<p>Also, don&#x27;t use &quot;kubectl create&quot; — use &quot;kubectl apply&quot;. It will create or update as needed. It even supports recursing through directories.<p>&gt; How to use volumes in Kubernetes :(<p>It&#x27;s only sad if you use persistent volume claims, which is the &quot;advanced&quot; option which I don&#x27;t think Swarm even has. I&#x27;m not sure why the author felt they needed to use them.<p>Kubernetes supports ordinary volumes that don&#x27;t require that you predeclare anything else. For example, on Google Cloud Platform:<p><pre><code>        containers:
          [...]
          volumeMounts:
          - name: pgdata
            mountPath: &#x2F;var&#x2F;lib&#x2F;postgresql&#x2F;data
            subPath: pgdata
            name: pgdata
        volumes:
        - name: pgdata
          gcePersistentDisk:
            pdName: some-disk-i-created
            fsType: ext4
</code></pre>
This will mount the persistent disk &quot;some-disk-i-created&quot;, and automatically format it as ext4 if necessary.<p>Persistent volume <i>claims</i> are for managing pools of storage: You create one volume, then let pods carve out pieces of it. So you create big, generic volumes and let Kubernetes handle allocation, as opposed to setting up dedicated, named volumes for each container.<p>There are pros and cons to both approaches, of course. PV&#x2F;PVCs obviously require that they&#x27;re defined first. That said, once you&#x27;ve created a PV, it&#x27;s actually less work to <i>use</i> it across multiple pods, because Kubernetes will handle the gritty details of allocation.<p>&gt; the fickle beast that is Kubernetes Ingresses ...<p>In my opinion the ingress system is the weakest part of Kubernetes right now. That said, once you create a controller (nginx-ingress-controller is great, and covers most needs), setting up new ingresses is dead easy, and certainly easier than managing your own load balancer using something like HAProxy or Nginx.<p>(For simplicity&#x27;s sake I recommend keeping a single ingress file for your entire system, as opposed to spreading them out among different YAML files. Easier to manage.)<p>But you don&#x27;t <i>have</i> to use an ingress or a managed load balancer. It&#x27;s just a convenience. The way to do it is to use a NodePort, then run your own load balancer that points to it. I don&#x27;t think this is any different from Docker Swarm. To spread the load across a cluster of containers, you need, per definition, a <i>load balancer</i>. You can also run a Kubernetes-aware load balancer such as Traefik.<p>&gt; Realising that to use paths i.e. example.com&#x2F;path ...<p>The Nginx controller doesn&#x27;t use physical paths for the ingress endpoints that it proxies. I don&#x27;t know what he means by this. I have not had this issue.