AWS BLOX vs Kubernetes

New kid on the BLOX

Yevgen Volchenko
3 min readDec 23, 2016

On the first of December Amazon launched BLOX a collection of open source tools for the EC2 Container Service. The idea here is to let you build container schedulers and integrate third-party schedulers like Mesos or Kubernetes with ECS. ESC also got update with affinity oriented scheduler.

Overview of Amazon ECS + BLOX

Amazon EC2 Container Service (ECS) is a highly scalable, high performance container management service that supports Docker containers and allows you to easily run applications on a managed cluster of Amazon EC2 instances. Amazon ECS eliminates the need for you to install, operate, and scale your own cluster management infrastructure.
BLOX is a side component that includes a service that consumes the event stream, uses it to track the state of the cluster, and makes the state accessible via a set of REST APIs. The package also includes a daemon scheduler that runs one copy of a task on each container instance in a cluster. This one-per-container model supports workloads that process logs and collect metrics.

The major components in Amazon ECS are:

  • Task Definition: The task definition is a text file, in JSON format, describing the containers that together form an application. Task definitions specify various parameters for the application e.g. container image repositories, ports, storage, etc.
  • Tasks and Scheduler: A task is an instance of a task definition, created at runtime on a container instance within the cluster. The task scheduler is responsible for placing tasks on container instances.
  • Service: A service is a group of tasks that are created and maintained as instances of a task definition. The scheduler maintains the desired count of tasks in the service. A service can optionally run behind a load balancer. The load balancer distributes traffic across the tasks that are associated with the service.
  • Cluster: A cluster is a logical grouping of EC2 instances on which ECS tasks are run.
  • Container Agent: The container agent runs on each EC2 instance within an ECS cluster. The agent sends telemetry data about the instance’s tasks and resource utilization to Amazon ECS. It will also start and stop tasks based on requests from ECS.

Overview of Kubernetes

A running Kubernetes cluster contains node agents (kubelet) and master components (APIs, scheduler, etc), on top of a distributed storage solution. This diagram shows our desired eventual state, though we’re still working on a few things, like making kubelet itself (all our components, really) run within containers, and making the scheduler 100% pluggable.

The major components in a Kubernetes cluster are:

  • Pods — Kubernetes deploys and schedules containers in groups called pods. A pod will typically include 1 to 5 containers that collaborate to provide a service.
  • Flat Networking Space — The default network model in Kubernetes is flat and permits all pods to talk to each other. Containers in the same pod share an IP and can communicate using ports on the localhost address.
  • Labels — Labels are key-value pairs attached to objects and can be used to search and update multiple objects as a single set.
  • Ingress — a collection of rules that allows inbound connections to reach the cluster services.
  • Deployment — provides declarative updates for Pods and Replica Sets.
  • Namespaces — virtual clusters backed by the same physical cluster.

Comparison between Kubernetes and BLOX ECS

Conclusions

Only time will tell if Amazon’s decision to ignore adoption of market leaders and to create a production ready container orchestration system on their own will succeed, but for it looks like they are about two years behind.

--

--