Kubernetes is a red flag signalling premature optimisation
I have previously talked both about the advantages and disadvantages of Kubernetes, but some of the points in this article seem interesting to say the least. I know that a lot of folks are already disagreeing with some of them, but I wouldn&#x27;t suggest that the author is plain wrong, merely that there is a lot more nuance to it.<p>&gt; Companies using Kubernetes for an application that is a web app.<p>There is probably a whole spectrum, with manually deploying code to shared hosting through SFTP being on one end and having full Infrastructure as Code running on Kubernetes with CRDs and other functionality on the other.<p>Personally, I think that you need to find the sweet spot:<p><pre><code>  - use containers, otherwise your app environments will rot over time, or at the least become inconsistent
  - consider something like Ansible or another GitOps approach for managing the app config, consider the same for server seetup
  - use some sort of container orchestration, whatever is easier and whatever you&#x27;re more familiar with (Docker Swarm, Hashicorp Nomad, K3s)
  - if you do go for Kubernetes (K3s or otherwise) make it as simple as possible, don&#x27;t go for fancy service meshes or bunches of operators etc.
  - document what you can: with Markdown or whatever for describing things that need to be known and done manually, code for the rest
</code></pre>
This approach has allowed me to be able to add any server to a cluster easily, to distribute the load of all the app services, or even be able to treat many projects with different tech stacks the same way: just launch the container, configure resource limits, parameters, storage, networking&#x2F;certificates and it&#x27;s done. Things crash? Automatic restarts and liveness probes&#x2F;health checks. Want the logs? Just look at the output or easily configure shipping them somewhere. Need to deliver new version to clients? Just push to Nexus&#x2F;Artifactory&#x2F;Harbor. And should your org have separate Ops people? Well, they won&#x27;t really have to care about someone wanting to bump the JDK version or whatever, let the devs care about what&#x27;s inside of the app themselves. Security concerns? Scan the whole container with Trivy? Clients have a different environment? They probably can run OCI containers somehow.<p>Many of those advantages also apply to monolithic apps, like some garbage that may only run on JDK $OLD_VERSION or $OLD_DISTRO, but should still have its surface area for attacks limited as much as possible. If done right, developing apps like this will be a breeze without getting too overcomplicated. If done wrong, you will get nothing done and will have to suffer with figuring out how to get your Kubernetes cluster up and running properly, then will have problems with resource usage etc.<p>&gt; More than one language for your application. For example, a backend in Golang, Ruby, PHP etc. and a Frontend Web App in React, Vue etc.<p>This is probably the most controversial argument: I will admit that using something like Ruby on Rails or Laravel, or any other server side rendering option will probably be a pretty decent and fast way to get up and running.<p>Yet, nowadays people like developing APIs so that other apps can be connected to those relatively easily, which is somewhat handled by most of these options as well, though developing a separate front end and dogfooding the API yourselves will perhaps be the better way to ensure that everything works as expected.<p>More so, in my personal experience trying to develop both the front end and back end as a single bundle can sometimes be a major pain in the behind, which gets infinitely worse when you do have some sort of a full web app that you try to embed and serve from the back end container&#x2F;process&#x2F;deployment as static files, because of issues with permissions, threads&#x2F;performance etc. If anyone is curious, doing that with Spring (not Boot) was really annoying and kind of brittle, having to always deploy them together and having unreasonably long startup times aside.<p>So I can&#x27;t help but to lean towards a split setup (in most cases):<p><pre><code>  - RESTful API for the back end, can be used by the front end or other integrations (I don&#x27;t think that GraphQL is all that good, but it&#x27;s also an option)
  - some sort of a separate web app front end (Vue, React, Angular) that is served by Nginx&#x2F;Caddy&#x2F;Apache and may later be replaced&#x2F;migrated over to another solution etc.
</code></pre>
&gt; Not using a cloud service to host your app. Examples are Heroku, Vercel, Netlify and Fly.io. Most product teams will have over-architected their solution if they have to have an ops or infra team.<p>This probably depends on corporate policies or whatever people are comfortable with. Using those cloud services will result in vendor lock which, as Heroku showed, isn&#x27;t always cost effective or even that good of an idea long term. Currently I pay around 260 Euros&#x2F;year for my servers (5 VPSes) on which I run my containers, some people pay more than that per month on certain platforms. Because I settled on OCI containers as the common runtime format and the aforementioned approaches to orchestration, I can switch between whatever hosts that I want.<p>Previously, I&#x27;ve used DigitalOcean, Vultr, Scaleway, Hetzner, Contabo and Time4VPS (my current one) and can easily move, whenever a better offer comes along. Of course, for many startups with SV funding that doesn&#x27;t matter much, but there is definitely a lot of merit to avoiding vendor lock and focusing on open source standards. Or, you know, you decide to work in an industry where the law book gets thrown at you and you have to do on-prem.