kubernetes (k8s)

A non-definitive guide

nerd trivia: kubernetes is greek for helmsman

An open-source orchestration system for containers, originated by Google.
http://kubernetes.io/

k8s components

The declarative, programmable API consists of:

  • Pods
  • Replication Controllers
  • Services
  • Labels
  • Namespaces
  • kubectl/API

source: https://github.com/kubernetes/kubernetes/blob/master/docs/design/architecture.md

Current Features

  • Scheduling
  • Auto Scaling
  • Bin Packing
  • Service Discovery (semi-automatic)
  • Automatic Software Defined Network for Services
  • Automatic Load Balancers (cloud provider dependent)
  • Self-healing
  • Rolling updates
  • Secret/Password Deployment

Ideal Use Case

  • Stateless workers
  • Micro-services
  • Deploying composable/modular services

source: Brendan Burns http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html

source: Brendan Burns http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html

source: Brendan Burns http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html

Less than Ideal Use Cases

Kubernetes is still a WIP, these apply for the moment.

  • Stateful servers (databases)
  • Containers that need host information to start (e.g. etcd, zookeeper)
  • Strict anti-affinity (2 must not be placed on the same VM/host)
  • When ~100% cluster admin uptime is required
  • Inter-host containers that need to write to the same volume

Availability

Available in major cloud providers

  • Google Container Engine (semi-hosted)
  • Google Compute Engine
  • AWS
  • Azure
  • Mesos
  • Your laptop/desktop: docker, vagrant