Commandeering Kubernetes with Elixir

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →
Cory O'Daniel
November 07, 2019

Commandeering Kubernetes with Elixir

The basics of extending Kubernetes using the Operator Pattern and a demo of using Bonny, the Elixir based Kubernetes Development Framework.

Cory O'Daniel

November 07, 2019

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

69 slides
  1. Cory O’Daniel (apostrophe not required) Senior YAML Architect @ Container

    Heroes Creator of Bonny Kubernetes Development Framework @coryodaniel @coryodaniel
  2. Why do we extend? The operator pattern allows you to

    codify the expertise of a human operator with deep knowledge of managing an application or set of services and how to react if there are problems.
  3. The Operator pattern for extending Kubernetes • Process a chunked

    HTTP stream of add, modify, and delete events • Continually reconcile k8s resources’ state changes • Manage background tasks, processes, and state
  4. Why Kubernetes? Service Discovery and Load Balancing NODE NODE Where

    is microservice-a.prod.svc.cluster.local NODE MASTERS
  5. `kubectl explain pod` • 1 or more colocated docker containers

    • Acts as a “logical host” • Share volumes • Share network • Live and die as a unit
  6. `kubectl explain deployment` • Declarative management of pods ◦ Desired

    number of pod replicas ◦ Rollout Strategy ◦ Revision History
  7. `kubectl explain service` • Exposes a set of pods as

    a network service • Selects pods using labels
  8. Scheduler ETCD Master Components NODES Deployment ReplicaSet Pod API Server

    Deployment Controller ReplicaSet Controller Ctrl Manager HTTP POST HTTP GET deployment/nginx replicaset/nginx-jk1234 pod/nginx-jk1234-6963
  9. Our first operator: Todos App Create a Custom Resource Definition

    (CRD) • Generates a REST Endpoint • Defines the fields and validations we expect
  10. Our first operator: Todos App Create a Controller • Polls

    REST endpoint • Reconciles changes in resource state

Other Decks in Programming