by tombh · 4y ago · 0 comments
Here's a better sketch for the story. It starts with Ruby, itself a game-changing language, that inspired a new culture of developer-centric best practices like Rspec's TDD and Bundler's lockfiles.
Ruby made the first PaaS possible, Heroku (a YC startup), which itself inspired a whole new way of thinking about software. I don't think enough people realise just how influential Heroku's 12 Factor App manifesto[1] was, in fact I'd argue it's the real hero in this whole story. The 12 Factors are just text, it's not even software or hard and fast requirements, they're merely best practices for the entire experience of writing, collaborating, testing, deploying, scaling and maintaining software. The 12 Factors aren't just about pushing your app on Kubernetes or whatever, they're just as much, if not more so, ideas that make _you_ a better engineer. Heroku made money for sure, but they did something beyond money, they upped the level of our craft as a whole.
The central concept in Heroku is the dyno. If you follow the 12 Factors, then you magically get almost infinitely scalable dynos. It plays right into the heart of the new gold rush world of startups, where anybody can have an app idea and leverage the global marketplace with the abstractions of datacentres and the cloud.
Docker is the open source dyno.
So many PaaS projects apart from Kubernetes have risen and fallen around Docker. Deis, Flynn, Dokku, Swarm, to name but a few. So many of the core concepts of Kubernetes were innovated and explored, and arguably mastered, before Kubernetes came on the scene. Kubernetes is a success not because of its innovation, but because it's backed by The Rich Kid. The world was already heading in this direction, Google just threw big numbers at it to make sure they took the biggest piece of the pie.
It's about efficient use of multiple machines, or as Google & ex-Google employees called it in a book released at similar time as Heroku went from private beta to GA, "Datacenter as a Computer".
12 factors were important, but they just as well can apply to noncontainerised software (arguably, they are just as valid in the ~2000 world of EJB java servers, except replace "environment variables" and the like with JNDI).
That said, Rails exploding in popularity around the same time as EC2 became an option heavily helped push the generic case out of the hell of PHP with occasional CGI (ASP usually meant you had more resources than shared hosting from hell)
Of course the technical lineage of Kubernetes is Borg and parents (which I admit I've never heard of), but I put it to HN that Kubernetes' lineage is not what created the market fit. In fact I think it's disingenuous of the documentary to imply that (in fairness it does give time to Docker), hence why I'm so keen to give my version of events.
Your point about how The 12 Factors apply just as well to non-containerised software is exactly the beauty of them! The 12 Factors don't come from management, they're not an attempt (at least directly) to capture profit from a market. They are somehow fundamental axioms about writing software in this current era, they're maybe even self-evident, universal truths. It turns out that there is a fundamental connection between the ability for a piece of software to be efficiently scaled and for that piece of software to be collaborated on. 2 or more developer machines share essential characteristics with 2 or more scaled containers, which share requirements with 2 or more CI instances ― reproducibility, behaviour guaranteed by tests, ease of downloading, security, configurability through ENV.
You see how we felt like Heroku understood us the humble developer, it made us DevOps, all whilst helping us satisfy the bottom line of managers? Kubernetes is truly an extraordinary piece of software, but it hasn't, nor do I believe it ever will, achieve anything of The 12 Factors' lasting legacy.
What my point is that while Heroku might be a very applicable relation to some, it's very explicitly a Platform as a Service, in a way pushing a bit back towards the model that we were escaping from (by invoking Rails name) in mid-2000 to cheap full-OS machines, from the confines "PaaSsy" LAMP.
Kubernetes didn't capture a zeitgeist by introducing any of the features (though it definitely pushed containers up into enterprise world a lot). It was in no way first, or even second, despite coming from home of linux containers. It doesn't even force you to use 12 factors - I should know something about it, having done what many called stupid, as in I did "lift and shift" of over 60 "classical" applications that in no way fit 12 factors onto it.
Now, trodding a bit further away from concrete facts and into more a world of personal opinion...
Kubernetes captured the zeitgeist by working. There was immense desire across all kinds of business, developments, etc. for something that fit nebulous label of "private cloud". Often with local deployments involved. And to do it cheaper (or at least, easier to automate) than existing "heavy" virtualisation stacks. Not everyone could use at all, or just burn money on AWS, many VPS providers were more like classic VMware virtualization clusters in experience. Some had money to burn on Heroku and actually fit running on it (or were lucky to fit in the cheap band of usage).
Thus you had OpenStack and the dwarfs: CloudStack, Eucalyptus, OpenNebula, Ganeti, with more adventurous ones building on Mesos or fully custom.
All tackling the problem of, essentially, providing simpler and faster (in turnaround time) way of handling users access to resources.
The most moneyed and successful (at least from pov of Ops) was OpenStack. And it was a hot mess. Upgrading an openstack cluster was a meme, and not a nice one. Meanwhile containers gain steam, for good or bad, and people start to move from moving from the quite bad "single app VM instances", to containerised approach (12 factors already hit harder due to the single-app VM approach popularised by AWS ASGs coupled with cloud-init).
Into this enters kubernetes. Yes, it might seem hard to setup - but it's no OpenStack, it brings no licensing purchasing mess of VMware, it initially kills one of the more annoying aspects (though it will return) which is the overlay networking. It brings unified API, simple operating model (wish I kept the old 1.0-1.4 presentations on hand that went bottom up!). We can deploy stateless services in somewhat sensible way (and if you know how, they can be stateful too). The saner internal design and API commonality can be arguably compared to the effect of the original "heroku" command that allowed you to just deploy from a git repo - just from the point of Ops team.
By next year, we move from simple ReplicationController to ReplicaSets + Deployments, as well as gaining Ingress beta and first rush of "pluggable" componentry in the form of Ingress Controllers. It's arguably the time where you can start dealing with K8s as simplistic replacement for Heroku - except it's not some closed magic operated by the Wizard of Oz, but something you can deploy on bunch of Raspberry Pi in middle of presentation at a conference after suffering a long trip (we even forgot, iirc, to bring our planned kube-master machine and had to improvise). Early versions of TPRs (priors of CRDs) make me give what were probably some of the first talks about operators (before CoreOS people coined the term) - but I used the same terminology as K8s used (Controllers).
By 2017, the recommended way to deploy openstack starts to be "deploy openstack on top of k8s", and DC/OS starts to visibly lose. K8s makes certain things forced upon you, but you find that it doesn't matter and tends to make sense (Pods having one IP, etc.). Secondary/Tertiary adoption follows, bad memes start about kubernetes (like you only need it for scale, that it's cloud specific, etc. etc.) but it doesn't really matter. Soon, operators start flowing in, thanks to simplicity of the API model (this evolves later to things like Crossplane and even separating kube-apiserver into standalone program, to run without rest of k8s). K8s manifests might feel like JCL, but you don't care because of how bloody more complex the same things used to be before.
Heroku might have provided easy way to deploy constrained application for a developer, but, at least in my experience, k8s became the lever with which I could move a lot of servers with little effort, whether to run large batch jobs, complex meshes of microservices, CI build jobs, or build a heroku-style PaaS. As developers learnt to follo 12 factors, the job became easier.
P.S. Funnily enough, probably because accidents of history kept me on the Ops side, but IME kubernetes adoption always had push from the sysadmin side, not necessarily developer side.
P.P.S. As nice as Heroku is, there's a reason why it's my main example of burning money, especially contrasting how it's billed as "cheaper than paying for an Ops engineer". In the world of global pricing, what works as cheap in Silicon Valley is... not cheap in most of the world.
P.P.P.S This kinda went ranty, I guess I should maybe write a blog post on this perspective...
I totally know what you mean about OpenStack! So much potential, but just way too complicated. But I'm not sure it's fair to say that Kubernetes was the first project to Just Work™. I never tried Mesos, but it's always seemed more accessible to me. But I did use Deis and Flynn though, and they were a delight in comparison. Deis of course being the home of Helm, Kubernetes' now de facto packager manager.
Also don't you think that Kubernetes explicitly embraced Docker right from the start as a first-class citizen? OpenStack only ever bolted it on as an after thought. Kubernetes knew what the buzz was and made sure to let everyone know that Docker was front and centre. This is why I think it's better to think of Kubernetes as a spiritual child of Docker (and therefore everything that came before Docker) rather than a technical descendant of Borg.
Although Deis and Flynn were certainly already creaking under the weight of what it truly meant to support the full gamut of cloud features, they were heading in the right direction. Google really did knock it out of the park, which I'm grateful for, but I think they did it more with the sheer weight of money and reputation than any innovative technology. Nobody really knew the devs behind Deis and Flynn, but everyone knows Google's reputation. And so we all just came to warm our hands around Kubernetes' fire, and the rest is history.
While the entire comment could be contradicted, a quick example is that google’s SRE book details much more developer strategies, including from a massive scale and enterprise perspective, than 12 factor web app. This book was assembled but industry experts with experience from Borg, with borg emerging from the global work queue — decades before heroku existed.
I would argue that's precisely the problem. Google are clearly capable of doing complex things, but inspiring and nurturing an entire cultural shift is a different category of "complexity", which in the story of Paas, Google did not achieve, they merely exploited it.
I think you're arguing that that's a bad thing. But it's a thing that very much did happen, because kubernetes is successful.
The pattern that you see often with PaaS is that they work great until they don’t. When you want to do something that doesn’t fit the patterns that the PaaS was built for you are out of luck and pretty much have to drop down to VMs.
We aimed to have k8s be something that was in the middle. Generic enough to work with a large number of workloads while providing significant advantages above raw VMs (and a level of consistency across infra providers).
The tradeoff is that it is more complicated than the typical PaaS. That is the tradeoff. The goal then was to build kubernetes to be built upon. We never claimed to be solving the whole problem in one system.
This is similar, in some ways, to the design of Mesos. But to do something new with Mesos requires an entirely different “framework” that exposes its own API. You see this with things like Marathon or Aurora or Chronos. While the underlying scheduler was shared across these there was no common API and so it was difficult for users to mix/match across these.
By focusing on a consistent IaaS-ish API for k8s (and eventually, with CRDs, building extension mechanisms) we aimed to create an ecosystem of things building on k8s.
Whereas PaaS are often a framework where you put your code in and a lot of decisions were made for you, I always viewed k8s as a toolkit where you get a lot of powertools that you can use in various ways. It is a very different philosophy.
12 factor and Docker obviously play a big part of this. And those built on experience and systems that came before them. We are all standing on the shoulders of those that came before us.
For me, this API design experience was informed by my time at Microsoft. Things like VB and IE/web were very much, at that time a framework (the web is turning into a toolkit over time now). I saw, multiple times, how those things were super useful but were limited. Things like the CLR and the C# ecosystem evolved the VB model to be much more of a toolkit.
We see this also in the Java world. I’m not an expert there, but the move from app servers to things like Spring Boot also show the shift from framework to toolkit.
AWS itself is a toolkit. And IMO, the difference between something like lambda/faas and a PaaS is that lambda/faas only works when it is in context of the larger toolkit that is IaaS cloud.
(I’m one of the founders of k8s and ended up with quite a bit of screen time in the documentary. My only regret is that more people that were so important in the k8s community couldn’t be featured!)
I actually wrote my own complete PaaS from scratch once[1], and contributed to a number of other PaaS projects. I totally agree that PaaS projects work great until they don't. The reality is that a PaaS has to also be a Iaas, and yes Kubernetes really hits that middle ground. Thank you so much for your part in that.
Having ridden the heyday of Java application servers, I see Kubernetes as LanguageAgnosticEE, just way more complex than dealing with WebSphere or WebLogic ever was.
> My only regret is that more people that were so important in the k8s community couldn’t be featured!
Would you like to list some of those individuals here? Perhaps they have homepages/blogs we can check out?
I very much enjoy it and I'm glad whether I see someone mention it or I can spread and teach its wisdom.
This is absolutely true, you can build a well factored app with intent to run it on 1 server. I would say it's very much worth it because adhering to these best practices will not only make maintenance of your app easier but it'll make things SO much easier to move from 1 server to multiple servers later on if you need to where "servers" in this case could be a Kubernetes cluster, Heroku or anything in between.
If anyone is curious I recently put out a 90 minute ad-free video going over how to create a 12 factor app with a Dockerized app at https://nickjanetakis.com/blog/creating-a-twelve-factor-app-.... It goes over the whole original 12 factor guide from start to finish and applies it to a code base.
Even now 10+ years after the 12 factor guide was originally released it still very much applies today because the guidelines transcend technology.
I remember reading this guide so many years ago and thinking "yep, this is it, they nailed it". So much goodness has come out of the Ruby community, especially around the idea of creating high quality services and tools built from really successful applications. In this case, the 12 factor guide is an extraction of best practices after running hundreds of thousands of apps on Heroku and Rails is an extraction of building Basecamp.
Moreover, Kubernetes and Heroku aren't even in the same class of tools. Kubernetes is an orchestrator for containers, which obviously can be used as the foundation for a PaaS, but Kubernetes isn't itself a PaaS even when you consider the various managed Kubernetes offerings which include some higher level abstractions built atop Kubernetes primitives.
Further still, it's not like Google marketed Kubernetes to any significant degree prior to its own adoption of Kubernetes as its official container orchestration offering for its cloud (which was after the writing had been on the wall for a while that Kubernetes would become the de facto container orchestrator).
TL;DR: Just because other tools and technologies predated Kubernetes didn't imply that it was significantly impacted by them.
I think it's fairer to say that Google _repurposed_ Borg, in order not to be left out of the changing landscape. Borg may be the technical predecessor to Kubernetes, but my point is that Borg is very much not the spiritual ancestor of the new containerised paradigm.
(This is describing a book that would be interesting to read).
Chapter 1 - Cobol on the Mainframe
A description of how the world's financial infrastructure ran on mainframes from the 1970s onward.
Chapter 2 - The rise of the Internet
A quick description of the take off the internet and how companies would scale on the internet. Ops teams of hundreds and Solaris machines in data centers.
Chapter 3 - Containerization, Virtualisation and Separation of process/progams
The technological routes of virtualisation and containerisation, from the Mainframe to jails to containers.
Chapter 4 - Scaling by the majors
A description of Google, Microsoft, Yahoo and others scaled their own operations in the early 2000s.
Chapter 5 - Selling Scale
Heroku and then the birth of AWS.
Chapter 6 - Everyone in the Cloud
The growth of Cloud Computing with AWS, Azure, GCP, OCP, Hetzner, Digital Ocean etc, etc.
And, ya know, invented cgroups and everything.
What is your argument here? If Google doesn't innovate everything, it can't be innovative?
This is nonsense.
I knew app engine and other things for much longer.
I would not subscribe to your interpretation.