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

Intro to Kubernetes

Intro to Kubernetes

Why Should I learn about Kubernetes and what are some basics

https://www.youtube.com/watch?v=wjOFupwbpX4&t=3444s

Christopher M Luciano

June 15, 2017
Tweet

More Decks by Christopher M Luciano

Other Decks in Programming

Transcript

  1. About Me • Advisory Software Engineer @ IBM • Part

    of Open Source Technology Team in IBM Digital Business Group • Work on Kubernetes and other Cloud Native Computing Foundation (CNCF) projects • @cmluciano_ on Twitter
  2. Index • Who and Why Kubernetes • Kubernetes Architecture •

    Kubernetes Application Concepts • Demo • Can someone else run this for me?
  3. Problem My application is a daily menu sign on a

    breezy day Sign falls down -> pick up -> return to step 1
  4. Problem I need my organic orange juice consumption to not

    be affected by the rise and fall of traffic to my service.
  5. Problem I have a lot of avocados here but I

    only want the ones that will yield guacamole TONIGHT!!!
  6. Problem I need to be sure that I can rearrange

    cars efficiently, when a large SUV needs to get to the Penguins game now!
  7. Summary of Problems ◦ Capacity management during peak times ◦

    Scheduling for unpredictability ◦ Reliable upgrades ◦ Deploying the same way every time ◦ Allow the machines to monitor and fix themselves
  8. Kubernetes Master Components • Etcd ◦ Backing datastore for K8s

    ◦ Stores all cluster related information • Kube-apiserver ◦ From end API server for Kubernetes that exposes the Kube API to clients • Kube-controller-manager ◦ Runs Kube controllers that perform routine tasks like populating endpoints, tracking nodes that appear and leave, etc • Kube-scheduler ◦ Watches for new pod creations that are not running and finds a node for them to run on
  9. Kubernetes Node Components • Kubelet ◦ Collects all resources and

    detail on a given worker node and exposes them for scheduling ◦ Also takes care of the pod lifecycle which includes mounting volumes, downloading dependencies, etc. • Kube-proxy ◦ Maintains network rules and connection forwarding ▪ Normally done through IPtables • Container Runtime ◦ Rkt ◦ Docker • Supervisord ◦ Babysits the kubelet as systemd would
  10. Container • Basic building block • Should contain one process

    or application • Ex. https://gist.github.ibm.com/cmluciano/b52e3764b3bdcb826ae37b039d9f b2be
  11. Pod • Collection of containers ◦ Can store things in

    a pod specific scratch space ◦ Can talk to each other over localhost ◦ Scheduled to a node as a group • Ex. https://gist.github.ibm.com/cmluciano/b52e3764b3bdcb826ae37b039d9fb2 be
  12. ReplicaSet • Schedules new pods based on desired number •

    Takes care of babysitting your pods and recreating whenever necessary • Should be grouped together with labels as a selector • Should most likely be used through a deployment • Ex. https://gist.github.ibm.com/cmluciano/b52e3764b3bdcb826ae37b039d9fb2be
  13. Service • Collect multiple pods together into related groupings based

    on labels • RS front-end communicates with RS backend to create service X • Creates an IP that represents the whole service and load balances appropriately
  14. IBM Cloud Kubernetes • Native K8s APIs • Fully managed

    HA installation • IBM Cloud LoadBalancer • Support for Ingress • IBM Cloud registry • Container security scanning • Ease access to other IBM Cloud services like Watson and Compose.io