EKS vs. KOPS

In the past, applications would be deployed by installation on a host, using the operating system package manager. This was a heavy solution with tremendous reliance on the operating system package manager and increased complexity with libraries, configuration, executables and so on all interconnected.

Then came containers. Containers are small and fast, and are isolated from each other and from the host. Containers have numerous benefits, such as continuous development and deployment, agile application creation,  and increased portability to name just a few.

Enter Kubernetes, or “K8”. Kubernetes is “a portable, extensible open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation” and is used extensively, including by IBM, eBay and SAP.

Kubernetes, Containers and AWS

A containerized application typically consists of many containers. There might be a container for the application itself, for a database, and so on. This environment could be built and tested on a single host, however this can quickly become problematic if there is an issue when in production.

Thus a multi-container application can be deployed on multiple hosts. But how does one manage these? A specialized tool is required, which is where “container orchestration” comes in. When it comes to container orchestration and Amazon Web Services (AWS), one of the most popular is the aforementioned Kubernetes. There are many ways to run a Kubernetes cluster on AWS, and we’ll look at two major ones: kops, and EKS.

Kops

Kubernetes Operations, or “kops” is a set of tools for installing, operating, and deleting Kubernetes clusters in the cloud. It is billed as “the easiest way to get a production grade Kubernetes cluster up and running”. Users include PlayCom and Spreaker.

What’s great about kops is that it gives powerful functionality (you can create, delete, and maintain Kubernetes clusters) from the command line.

It officially supports AWS of course, which is another benefit.

With kops, you can have fully automated installation, support for custom Kubernetes add-ons, autocompletion in the command line, self-healing functionality, and support for most operating systems.

EKS

Amazon Elastic Container Service for Kubernetes, known as EKS, allows the deployment, management, and scaling of containerized applications, using Kubernetes, on AWS.

EKS runs the Kubernetes management infrastructure across multiple AWS availability zones, eliminating that single point of failure referenced previously. Companies using EKS include GoDaddy, Skyscanner, Verizon, Snapchat, and many other giants.

EKS can be used for running microservices applications, hybrid container deployments, batch processing and application migration (you can containerize and migrate existing applications to EKS without needing to refactor code or tooling).

What are some of the benefits of Amazon EKS? For one, EKS is certified Kubernetes conformant, so applications managed by EKS are fully compatible with applications managed by any standard Kubernetes environment. Another benefit is that EKS provides on-demand upgrades and patching, and there is no control plane to manage.

Different Horses For Different Courses

Which to choose? Both of these options are powerful, market-tested and have great integration with AWS.

Amazon EKS launched at AWS re:Invent in December of 2017. Amazon rigorously tested it for 6 months before general release, so as to ensure reliability, and that is would be a realistic alternative to kops which is generally well-liked by the Kubernetes community and is open source. This is perhaps one of the reasons that take-up of EKS is taking longer than some people expected.

There is good reason for this however. As The New Stack reports, “One of the reasons why EKS is taking a longer time to become generally available is the integration with existing building blocks of AWS. From VPC networking to IAM, Amazon has carefully integrated the core services without breaking the expected behavior. Customers can also take advantage of standard monitoring and logging tools such as CloudWatch and CloudTrail for logging and monitoring EKS workloads. Amazon EKS passed the Cloud Native Computing Foundation conformance test to become a certified hosted platform, which means that all the plugins and extensions that work with upstream Kubernetes will work as is in EKS.”

Certainly kops is very easy to use, there is a tremendous amount of community support and literature around to assist users, and it is well designed for creating, deleting, customizing, upgrading and maintaining Kubernetes clusters.

Kops has the typical advantages and drawbacks of battle-hardened open source solutions, and certainly gets the job done. With EKS, the “new kid on the block”, Amazon has built a powerful tool that packs a powerful punch when it comes to functionality and integrations, including with popular AWS services such as their IAM.

In the end, if your organization is already deeply integrated with AWS, EKS could be a great option going forward. Like other Amazon services, keep an eye on costs, as scaling happens quickly and costs can escalate sharply. But don’t disregard kops just yet: it has proven itself as a solid performer that gets the job done.

Anyway you choose, be sure to check out Coralogix’s predefined image for K8 log collection, it includes all your K8 metadata and helps you get started in no time.

Terraform vs Helm Charts

Since Docker first came onto the scene in 2013 and really popularized containerization, many organizations have chosen to deploy cloud workloads using Docker containers.

Containers come with numerous benefits over running applications directly inside of a virtual machine hypervisor, including significantly portability benefits and efficiencies in terms of storage and overhead.

Docker provides a runtime for running containerized applications, in addition to a format for encapsulating and delivering applications in containers.

With the increasing adoption of containerization, the need arose to manage, schedule and control clusters of containers, and that’s where Kubernetes comes in. Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications, generally being Docker containers.

When interfacing with Kubernetes, 2 competing tools are often discussed: Terraform, and Helm.

Terraform

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing providers, as well as custom in-house solutions.

Terraform

For example, in large-scale infrastructures, static assignment of applications to machines becomes a challenge. To solve this, there are a number of schedulers like the aforementioned Kubernetes that can be used to dynamically schedule Docker containers. Resource schedulers can be treated as a provider, which allows Terraform to request resources from them, enabling Terraform to be used in layers; setting up the physical infrastructure running the schedulers, and provisioning onto the scheduled grid.

Configuration management is critical in the software development ecosystem, and while people have used platforms like Chef or Puppet for this purpose, Terraform adds a whole new dimension.

Key features of Terraform include:

Infrastructure as Code: Infrastructure as code (or IaC) is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. With Terraform, infrastructure is described using a high-level configuration syntax, allowing a blueprint of your data center to be versioned and treated as you would any other code.

Smoothness through cloud provider’s API

Terraform actually uses the cloud provider’s API, which makes the whole process a lot smoother, and more effective in terms of maintainability, ease and security.

Stability and efficiency through immutable infrastructure

Forget about configuration drift and bugs. Terraform uses the immutable infrastructure approach, where servers are replaced rather than changed. This means simplified operations, fewer failures, and fewer errors, threats, and vulnerabilities.

Simplicity through code

With server provisioning, Terraform leaves issues pertaining to software container deployment to Docker. The cloud infrastructure is seen as code, bringing additional advantages.

Effectiveness through declarative code style

With a declarative code style (imperative programming: how you do something, declarative programming: what you do/what the end state should be), meaning advantages when it comes to succinctness, speed, and fewer complications.

Terraform works with any cloud-based setup, so it doesn’t matter if it’s public cloud or an on-premise-based setup.

It allows:

Execution Plans: Use the planning step to see what will happen when you call apply, avoiding nasty surprises.

Resource Graph: Builds a graph of all your resources, and build infrastructure as efficiently as possible.

Change Automation: Apply changesets to your infrastructure automatically, conserving resources and avoiding errors.

Terraform is open source, with strong community engagement.

Helm

Helm helps users manage Kubernetes applications, and Helm Charts assists users in defining, installing, and upgrading Kubernetes applications.

helm

Helm is maintained by the CNCF in collaboration with Microsoft, Google, Bitnami and the Helm contributor community.

Keeping with the nautical theme of docking, containers and quays, Helm enables Kubernetes users greater control over their cluster, just like the captain of a ship at the helm.

Helm Charts provide the ability to leverage Kubernetes packages when building and deploying applications through a click or single CLI command. When a user executes the Helm install command, a Tiller (yes, another maritime reference) Server receives the incoming request, installing the appropriate package into the Kubernetes cluster. These packages are called Charts.

A chart can have deployments, configmaps, services, and so on defined as yaml files, which are templates. You can define certain charts as dependencies for other charts, or nest charts inside others.

Helm has a number of advantages:

  • Deploy and manage manifests in a production environment
  • Complex applications can be packaged together
  • Rollback or upgrade multiple objects together
  • An extensive and reusable pre-built chart repository
  • Easily change parameters of templates
  • Deploy to multiple environments easily

Helm has been praised by users for its vibrant community, its ability to manage complex apps, in-place upgrades and custom hooks for hassle-free updates, the ability to share Chart, and easy rollbacks.

Terraform vs Helm

Both Terraform and Helmchart have a number of similarities, as well as some differences.

In terms of similarities, they allow you to describe and maintain Kubernetes objects as code, they support modularity, have a curated list of packages, allow you to see the impact of changes before running them, and allow installation from sources like git repositories or local directories.

In terms of differences, Terraform does not install anything within the Kubernetes cluster itself, while Helm installs Tiller within the cluster. Helm cannot install a Kubernetes cluster, while Terraform can. When it comes to modularity Terraform uses modules while Helm uses sub-charts, and Terraform uses the JSON/HCL file format while Helm uses standard manifests and Go-templates.

Both Terraform and Helm have their advantages and disadvantages. For example, because Terraform uses the same tool and codebase for both infrastructure and cluster management, there is not too much of a learning curve when it comes to using it with Kubernetes. Terraform is also relatively new with its Kubernetes interfacing, so there are some kinks and issues. On the other hand, rolling back with Helm is a lot easier, but maintaining it can take up precious resources.

The safe option is to go with Helm, as it has been around for a while and has proven itself, not to mention the support of some serious players behind its continuing development. Terraform is improving rapidly, however, and can do a lot of the heavy lifting for you.

Using the Tools to Add Value

The debate is likely to rage on for a while, but what cannot be disputed is the popularity of Kubernetes, and the value it can add to any organization. The great news is that with some simple integrations, there are configuration management tools available that can take Kubernetes to a whole new level. Coralogix can be integrated into Kubernetes logs with a pre-set image so that you can take advantage of everything the platform has to offer: including mapping software flows, automatically detecting production problems, delivering pinpoint insights and providing top-level visibility.