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

Kubernetify All The Things

Kubernetify All The Things

Kubernetes 101 talk for Pittsburgh Tech Fest 2017

Steve Sloka

June 12, 2017
Tweet

More Decks by Steve Sloka

Other Decks in Technology

Transcript

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

    ▸ Demos ▸ Even More Demo ▸ Lulz throughout
  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. KUBERNETES “HELMSMAN OF A SHIP” ▸ Managing distributed solutions at

    scale, based on years of industry expertise (Google-scale experience) ▸ High availability of the control plane and user workloads (when using pod replication), avoiding most single points of failure ▸ Modular control plane architecture, allowing many peices to be replaced without disrupting workload availability ▸ Persist all of it's internal platform state within an etcd database
  5. ARCHITECTURE Master: Node(s): ETCD API SERVER CONTROLLER MANAGER KUBELET PROXY

    SCHEDULER CONTAINER ENGINE CADVISOR SOFTWARE DEFINED NETWORK ADDONS
  6. POD

  7. SCHEDULER ▸assign workloads to nodes ▸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. VOLUMES ▸ emptyDir ▸ hostPath ▸ gcePersistentDisk ▸ awsElasticBlockStore ▸

    nfs ▸ persistentVolumeClaim ▸ flocker ▸ glusterfs ▸ rbd ▸ gitRepo ▸ secret ▸ iscsi
  10. 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.CLUSTER.LOCAL API.NAMESPACE.SVC.CLUSTER.LOCAL DB.NAMESPACE.SVC.CLUSTER.LOCAL
  11. SERVICES SERVICE DISCOVERY FOR PODS ▸proxy runs on each node

    ▸virtual IP per service ▸dns address ▸[serviceName] ▸[serviceName].[namespace] ▸[serviceName].[namespace].svc.cluster.local ▸dynamic “pods” based on label queries ▸pods are auto-injected with environment variables
  12. NAMESPACES 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.)
  13. OPERATORS THAT’S ME RIGHT? ▸“An Operator represents human operational knowledge

    in software to reliably manage an application.” 
 ~ CoreOS
  14. OPERATORS EXAMPLES ▸etcd 
 (https://github.com/coreos/etcd-operator/) ▸Prometheus 
 (https://github.com/coreos/prometheus-operator) ▸Rook
 (https://github.com/rook/rook)

    ▸Elasticsearch
 (https://github.com/upmc-enterprises/elasticsearch-operator) ▸Kong
 (https://github.com/upmc-enterprises/kong-operator)