Intro to Kubernetes

Intro to Kubernetes

Why Should I learn about Kubernetes and what are some basics


Christopher M Luciano

June 15, 2017


  1. 2.

    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. 3.

    Index • Who and Why Kubernetes • Kubernetes Architecture •

    Kubernetes Application Concepts • Demo • Can someone else run this for me?
  3. 12.

    Problem My application is a daily menu sign on a

    breezy day Sign falls down -> pick up -> return to step 1
  4. 17.

    Problem I need my organic orange juice consumption to not

    be affected by the rise and fall of traffic to my service.
  5. 22.

    Problem I have a lot of avocados here but I

    only want the ones that will yield guacamole TONIGHT!!!
  6. 26.

    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. 27.

    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. 29.

    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. 30.

    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. 32.

    Container • Basic building block • Should contain one process

    or application • Ex. b2be
  11. 33.

    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. be
  12. 34.

    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.
  13. 35.

    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. 38.

    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