The Kubernetes API & Next Generation Automation Tools

01dc8e954957a10b428aa60b28c89d52?s=47 Ian Lewis
September 23, 2016

The Kubernetes API & Next Generation Automation Tools

The Kubernetes API provides new ways to build automation tools that are highly available and scale to serve clusters with many thousands of nodes. During this session attendees will learn how to move beyond shell scripts and configuration management tools and leverage cluster level APIs and distributed systems design patterns to build next generation automation tools. Attendees will learn how to extend the Kubernetes API and utilize their own custom declarative configuration to build controllers that automate job scheduling or schedulers that allow you to place jobs based on your rules.

01dc8e954957a10b428aa60b28c89d52?s=128

Ian Lewis

September 23, 2016
Tweet

Transcript

  1. Ian Lewis Developer Advocate, Google Cloud Platform The Kubernetes API

    & Next Generation Automation Tools Container Summit
  2. Confidential & Proprietary Google Cloud Platform 2 Ian Lewis Developer

    Advocate - Google Cloud Platform Tokyo, Japan +Ian Lewis @IanMLewis
  3. None
  4. Kubernetes is a platform for building distributed systems

  5. Your App

  6. Your Platform

  7. Google Cloud Platform users SSH SSH SSH The Clusters of

    Old server server server
  8. Google Cloud Platform users API Container Clusters Container Cluster

  9. Google Cloud Platform UI CLI API users master nodes etcd

    scheduler controllers master The 10000 Foot View kubelet kubelet kubelet kubelet kubelet kubelet kubelet kubelet kubelet
  10. Google Cloud Platform The 10000 Foot View etcd scheduler controller-manager

    apiserver kubelet docker kube-proxy iptables 1. User creates Deployment 2. API server saves info to etcd 3. CM finds Deployment and creates ReplicaSet, which creates Pods (unscheduled) 4. Scheduler schedules pods. 5. Kubelet sees pod scheduled to it and tells docker to run the container. 6. Docker pulls and runs the container. 1 2 6 3 5 4 Docker Hub / GCR
  11. Google Cloud Platform observe diff act Controllers

  12. for { resp := http.Get(secretsEndpoint) list := json.Unmarshal(resp.Body) for _,

    secret := range list.Items { data := base64Decode(secret[“data”]) if len(data[“password”]) < 10 { log.Printf(“Insecure secret: %s”, secret.Metadata.Name) http.Delete(secretsEndpoint + secret.Metadata.Name) } } }
  13. for { resp := http.Get(crontabEndpoint) list := json.Unmarshal(resp.Body) for _,

    crontab := range list.Items { addIfNew(crontab) updateIfChanged(crontab) deleteIfOld(crontab) } }
  14. Thank You