How Heptio plans to automate away Kubernetes setup pains

Using Google's custom Ksonnet language, microservices developers can spend less time on configuration setup

Heptio, the commercial Kubernetes outfit founded by two creators of that microservices management framework, has unveiled its first public project for making Kubernetes easier to deploy in the enterprise.

Kubernetes simplifies how apps run as microservices, but setting up Kubernetes itself is no picnic. Heptio’s project automates some of the fiddlier parts of the setup process via a custom, domain-specific language.

Heptio’s project, dubbed Ksonnet, is an open source tool set for assembling the configuration needed to deploy Kubernetes. The most common setup difficulties in Kubernetes involve creating the configuration files, what Heptio calls the “wall of YAML” problem.

Ksonnet uses the Jsonnet data-templating language, created by Google, to automatically generate the configuration files needed for a Kubernetes deployment. The resulting files have sane defaults for most use cases, but they can be customized as needed. The file generation can be done entirely programmatically or by using JSON as a base template for the configuration file to be generated.

One drawback to Ksonnet is that it requires you to write the templates in Ksonnet’s own code. You can’t use a familiar a scripting language like Python or Go (which Kubernetes is written in). Ironically, the underlying Jsonnet language used by Ksonnet has both Python and Go bindings, although only the Python API is an official offering.

Joe Beda, one of Heptio’s cofounders and also a cocreator of Kubernetes, explained why the company decided on a domain-specific language rather than, for instance, a library with bindings to a language of choice: Using Python or another scripting language “didn’t meet our long-term goals around making Kubernetes more approachable. In my mind, Jsonnet offers a great ramp from simply a ‘better JSON’ to ‘template some values’ to ‘manipulate structure.’ … Something that looks and feels like code (Python, JavaScript) can be really intimidating. When you are getting started, it just feels wrong to have to write a program to deploy your program.”

Ksonnet involves contributions from three other companies—Deis (now part of Microsoft), Bitnami, and Box—all with significant production-level Kubernetes deployments.

Ksonnet is not Heptio’s only Kubernetes focus. In a presentation delivered at GlueCon, three other efforts center around making it “accessible to non-systems engineers,” making it “trivial to get up and running anywhere,” and delivering “sophisticated enterprise-focused features.” Ksonnet could help deliver on that last area by providing a unified way for management frameworks like Chef or Puppet to assemble a Kubernetes install.

The Ksonnet project is still in the early, prototypical stages, Beda notes. Thus, the full scope of what Ksonnet could do for Kubernetes hasn’t been explored yet — both all the ways Ksonnet could be used to configure Kubernetes, and the level of abstraction possible for that configuration.

“If the raw YAML for Kubernetes is machine code then Ksonnet, right now, is kind of an assembly [language],” Beda says. “We are going to work our way up to higher and higher level representations while still providing ways to get to the full Kubernetes feature set.”

Also, Ksonnet may work out only as a solution for just one subset of Kubernetes users. “We don’t see Ksonnet as the only way to solve this, but we hope it’ll prove to be a way that works for a large percentage of users.”

Where Ksonnet might show the most payoff is with Kubernetes clusters that have more nodes. Having more nodes typically means more complex workloads deployed on those nodes, which is a better use case for Ksonnet. A recent Kubernetes user survey showed that around 48 percent of Kubernetes deployments used just between one and ten nodes. 

Still, even deployments with a modest number of nodes could benefit from a unified way like Heptio’s to manage how configurations are created—not only for manual setups but those done via a distribution like CoreOS, because Heptio would provide another mechanism for automating how Kubernetes itself can be managed.

Join the newsletter!

Error: Please check your email address.

Tags KubernetesMicroservices

More about GoogleMicrosoft

Show Comments

Market Place