Flatcar: A Cloud Native Take on Linux
Linux is much older than Kubernetes—it debuted in 1991, before many engineers in the workforce today were born—yet, both are fundamental to the modern cloud native application stack. And the same can be said for many other technologies that comprise it. The mismatch creates a challenge, because the ways older technologies are managed are different from the ways new ones are, and the former don’t always gel with the latter. One does not simply provision a Linux server like they do a Kubernetes pod!
A few years ago, the folks behind Flatcar Container Linux made it their business to change that, to give the world a version of Linux that would behave and be managed like a cloud native developer would expect. Today, engineers can configure and deploy Flatcar instances using the same declarative approach they use to create a Kubernetes cluster: by listing their desired configuration details in a YAML doc and then having the OS image automatically installed and configured on as many servers as they would like.
Here’s how the Flatcar team does this, with a little bit of help from its friends at Equinix!
All in One Place
"Zero touch." That’s how Thilo Fromm, director of engineering at Kinvolk, the company behind Flatcar that Microsoft acquired in 2021, describes their OS management vision.
Once you’ve created your YAML configuration file, a provisioning tool deploys your OS automatically. Flatcar even has built-in self-updating features to help maintain desired configurations automatically (similar to the way Kubernetes continuously strives to match your cluster configuration spec) while keeping the OS fresh and up to date.
Those who have provisioned or managed other Linux-based operating systems can probably appreciate why the Flatcar approach is a big deal. Most other Linux distros require you to learn a variety of bespoke tools in order to install software, apply updates, fix things when they break and so on. Sure, there are automated provisioning tools that help with setting up Linux servers based on preconfigured images, but that process is still a lot more complicated than, say, deploying a Kubernetes pod.
It only makes sense to use the same language and declarative approach cloud native developers or sysadmins already use to configure, deploy and manage their Kubernetes clusters to configure and provision Linux.
A Fresh Take On a Venerable OS
Fromm is fired up about Flatcar not only because he works at Kinvolk. He’s been steeped in the world of Linux and IaaS for decades and has seen it all.
He first began using Linux in the early 1990s, back when few people had heard of it. "Linux jives very well with my way of doing things," he says, because it allows him to customize and scale the tooling that he depends on as an engineer.
At first, Fromm used Linux just on personal devices. Later, working at an embedded-systems company, he became interested in it as a solution for embedded computing. He continued to work closely with Linux into the 2010s, when he got into the IaaS world. After a stint at AWS, he entered his role at Kinvolk.
He was drawn to Kinvolk by the seamless management experience that Flatcar (based on CoreOS, the container-centric Linux distro that Red Hat acquired but discontinued in 2020) offers. "The idea that you can configure everything beforehand, run your provisioning and rinse and repeat–that's a concept I found fascinating," Fromm says. "It fits right in with the way Kubernetes and container orchestration work at scale."
Building Flatcar With Metal—and for Metal
Flatcar works across all major infrastructure platforms, including public clouds to OpenStack. But Fromm and his team build their OS releases on just one platform: Equinix Metal.
They do so, Fromm says, because running their builds requires massively powerful infrastructure. Even with Equinix’s bare metal servers, each build takes hours, plus another 90 minutes or so to run post-build tests, according to Fromm. Builds would take much longer on VMs in the public cloud, which wouldn't be able to deliver as much compute power as Metal can provide.
In addition, Flatcar uses Bare Metal servers in data center locations across the world to host Flatcar images so that developers can download them easily from any region. The fact that Flatcar is both built and hosted on Equinix Metal also provides a security benefit, Fromm says, because it makes it possible to push newly built images from the build servers to the image hosting servers without having to expose the former to the internet.
The Metal-Flatcar relationship isn't limited to Flatcar's use of Metal infrastructure to run builds and tests. Metal also uses the Flatcar distribution to host its control plane software. Flatcar is deeply embedded within Metal's infrastructure, just as Bare Metal infrastructure is embedded in Flatcar’s core processes.
Flatcar also runs tests on other infrastructure platforms to ensure that its distribution works reliably on them, of course. But Fromm doesn't foresee a change to the project's use of Metal infrastructure for its builds. "We're very happy with the infrastructure and automation we get from Equinix Metal," he says. “Indeed, Metal allows us to test not just our bare metal releases but also multiple virtualisation vendors - we also run our VMWare and OpenStack tests on Metal.”
Keeping the Flatcar Train Running
On the surface, Flatcar underwent a major change when Microsoft acquired Kinvolk a couple of years ago. But, Fromm says, the acquisition has had very little impact on day-to-day development or roadmap.
"Microsoft enables us to work on Flatcar in a truly open source way," Fromm says. "Everyone from the community can now jump in and participate in Flatcar; this wasn’t always the case in the Kinvolk days. In the Flatcar project we see ourselves not as Microsoft employees as much as Flatcar maintainers." To further underline community stewardship, Flatcar Container Linux is in the process of joining the Cloud-Native Foundation as an incubating project.
Going forward, Fromm doesn't anticipate major changes to Flatcar as a project or Flatcar as a Linux-based OS. It’s already excelling in both respects: it has a highly active open source community and it provides a lean, secure and easy-to-automate Linux distribution that plays quite nicely with cloud native environments. Fromm says that Flatcar users can expect the project to keep chugging along, continuing to do what it already does so well.