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

Introduction to Kubernetes

Introduction to Kubernetes

Avatar for Adit Biswas

Adit Biswas

May 11, 2019
Tweet

Other Decks in Technology

Transcript

  1. Overview 1. What is it and why do you want

    to use it. 2. Basic concepts. 3. Use cases we are excited about
  2. Containers • Applications require: ◦ Language runtime (python / java

    etc) ◦ External libraries in your OS (libssl, libc etc.) ◦ Libraries at specific versions ( django 2.1) ◦ Source code at specifc commit ( user service on commit 1 of master branch) • Traditionally this is done by some step by step operation (manual installation, bash script, ansible) ◦ Pretty fragile ◦ Difficult to ensure it runs the same on two machines ( development machine is macOS, production is Ubuntu) • Package all this so that its the same every run ( images)
  3. Kubernetes • Abstracts out the underlying physical hardware • Declare

    your resources using declarable configurations ◦ Kubernetes scheduler will make sure the system state matches this configuration ◦ Self heals when things go wrong • Velocity ( provision dev/ test/ prod environments and throw them away quickly) • Efficiency ( physical resources are not underutilized )
  4. Deployment on Kubernetes • Looks pretty much the same as

    the traditional deployment except you play with containers now. ◦ Load balancer => Ingress Controller ( Service) ◦ EC2 instances for applications => Pods ( Deployment) ◦ Autoscaling group => Horizonal Pod Autoscaler / Replicas ◦ Stateful Databases => StatefulSets ◦ DNS => Kubernetes DNS ◦ Also some extra stuff : ▪ ConfigMaps for configuration management ▪ Secretes for secret stuff like passwords etc.
  5. Basic Concepts • Pods (deployment) • Services • ConfigMaps (

    if you want ) Skip most of the other concepts while starting to not get overwhelmed Do this course ( it’s 15 mins long in the browser) https://www.katacoda.com/courses/kubernetes/kubectl-run-containers
  6. Demo We’ll use a this application: https://github.com/testdrivenio/flask-vue-kubernetes A very complete

    post on getting it running here: https://testdriven.io/blog/running-flask-on-kubernetes/
  7. Use Cases - Temporary environments for testing ( continuous integration)

    - Extending developer environment ( let every developer run the complete distributed system for themselves for a safe playground ) - Introduce Service Mesh - Traffic tracing - Circuit breakers / rate limiting - SLA monitoring