Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Micro-datacenter chaos monkeys! Raspberry Pi & Kubernetes

Micro-datacenter chaos monkeys! Raspberry Pi & Kubernetes

Pittsburgh Tech Fest 2016

Steve Sloka

June 11, 2016
Tweet

More Decks by Steve Sloka

Other Decks in Technology

Transcript

  1. OVERVIEW ▸ Overview ▸ Background of Kubernetes ▸ k8s Concepts

    ▸ DEMO!!! (On a Pi cluster! —————————————————> ▸ Even More Demo ▸ More Demo ———————————————> ▸ Summary
  2. KUBERNETES ▸ open-source platform for automating deployment, scaling, and operations

    of application containers ▸ Servers 2-N ▸ Open Sourced by Google 2014 ▸ github.com/kubernetes/kubernetes ▸ Written in Go ▸ #GIFEE (Google-like Infrastructure for Everyone Else)
  3. GOOGLE EXPERIENCE ‣ Google has been using containers for over

    a decade ‣ 2 BILLON Per Week! (With a “B”) ‣ Everything at Google runs in a container
  4. “HELMSMAN OF A SHIP” ▸ lean: lightweight, simple, accessible ▸

    extensible: modular, pluggable, hookable, composable, toolable ▸ portable: public, private, hybrid, multi cloud ▸ self-healing: auto-placement, auto-restart, auto- replication
  5. ARCHITECTURE Master(s): Node(s): ETCD API SERVER CONTROLLER MANAGER KUBELET PROXY

    SCHEDULER CONTAINER ENGINE CADVISOR SOFTWARE DEFINED NETWORK ADDONS
  6. POD

  7. SCHEDULES PODS TO RUN ON NODES ▸global ▸best fit chosen

    based on pod requirements ▸allows for over-commit ▸pluggable
  8. CREATE PODS Desired: Actual: POD POD POD POD POD POD

    ACTION IS TO CREATE 3 PODS ——>
  9. DEPLOYMENTS ▸Pod template ▸Docker image(s) ▸Labels ▸CPU / Memory ▸Replicas

    ▸Volume Mounts ▸Revisions ▸Strategy ▸Define in JSON || YAML
  10. DEPLOYMENTS VOLUMES ▸ emptyDir ▸ hostPath ▸ gcePersistentDisk ▸ awsElasticBlockStore

    ▸ nfs ▸ persistentVolumeCla im ▸ flocker ▸ glusterfs ▸ rbd ▸ gitRepo ▸ secret ▸ iscsi
  11. KUBERNETES SAMPLE NGINX NGINX LOAD BALANCER API API API API

    LOAD BALANCER NGINX DB LOAD BALANCER K8S SERVICE K8S SERVICE K8S SERVICE NGINX.NAMESPACE.SVC.K8S.LOCAL API.NAMESPACE.SVC.K8S.LOCAL DB.NAMESPACE.SVC.K8S.LOCAL
  12. SERVICE DISCOVERY FOR PODS ▸proxy runs on each node ▸virtual

    IP per service ▸dns address ▸[serviceName].[namespace].svc.k8s.local ▸dynamic “pods” based on label queries ▸pods are auto-injected with environment variables
  13. SERVICE TYPES ▸ClusterIP: Internal to the cluster (SDN) ▸NodePort: Allocated

    port (range 30000-32767) ▸LoadBalancer: Provision loadbalancer on cloud provider
  14. PARTITION RESOURCES ▸A mechanism to partition resources created by users

    into a logically named group ▸Allows for work to be done in isolation ▸Each namespace is given its own: 1.resources (pods, services, replication controllers, etc.) 2.policies (who can or cannot perform actions in their namespace) 3.constraints (this namespace is allowed this much quota, etc.)