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

DevFest 2020 - Introduction to Kubernetes

DevFest 2020 - Introduction to Kubernetes

DevFest 2020 - Introduction to Kubernetes

Idowu Emehinola

November 21, 2020
Tweet

More Decks by Idowu Emehinola

Other Decks in Technology

Transcript

  1. Kubernetes (K8s) is an open-source container orchestration system for automating

    deployment, scaling, and management of containerized applications.
  2. Containers A Container can be said to be a Virtual

    Machine (VM) but instead of running in a predefined operating system, they run using your defined operating System.
  3. Containers VS Virtual Machines Infrastructure (hardware) Operating System Hypervisor OS

    Libs Deps Application OS Libs Deps Application Virtual Machine Virtual Machine Infrastructure (hardware) Operating System Docker Libs Deps Application Libs Deps Application Container Container CPU Utilization Disk Space Boot up time CPU Utilization Disk Space Boot up time
  4. What Next? How do we run it in production? What

    if our container depends on other containers? How do we manage that? When number of user increase, how do we scale up (or down)? When a container crashes, how do we spin up a new one IMMEDIATELY?
  5. Kubernetes Kubernetes (K8s) is an open-source container orchestration system for

    automating deployment, scaling, and management of containerized applications.
  6. Basic Concept - Node A Node is a machine (physical

    or virtual) which several kubernetes components are installed. It is a worker machine where containers launched by kubernetes would be running in.
  7. POD A POD is a single instance of an application.

    A POD is the smallest object, that can created in kubernetes. POD
  8. API version a "Pod" can be found. Object type to

    deploy Labels are used to "Identify" pods in the kubernetes cluster Name of the Pod Name of the Container running in the Pod Docker Image to run in the container
  9. ReplicaSet A ReplicaSet’s purpose is to maintain a stable set

    of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods. POD POD RELICASET
  10. API version for ReplicaSet Labels the ReplicaSet uses to filter

    and find it's Pods Labels are used to "Identify" this replicaSet in the kubernetes cluster Name of ReplicaSet Everything here is similar to the configuration of a pod except the "name" attribute. How many pods to run - how many instance of this application should be running at any given time
  11. POD POD POD POD POD POD v1 v2 UPGRADE ROLLING

    UPDATES ROLLBACK REPLICA SET
  12. POD POD POD POD POD POD REPLICA SET v1 v2

    UPGRADE ROLLING UPDATES ROLLBACK DEPLOYMENT
  13. Deployment Deployment which is a kubernetes object that comes higher

    in the hierarchy (relative to pod and replicaset). A deployment provides us with capabilities to upgrade the underlying application instances seamlessly.
  14. © Deimos Cloud (Pty) Ltd Name of deployment Label to

    identify Deployment resource in the cluster Defines the strategy used to replace old Pods by new ones Labels used to filter and identify pods. Labels used to target this pod Name of the container running in the pod. Docker Image Environment variable to use in the application e.g: PORT => 8000 PORT application is runs on. How many pods to run - how many instance of this application should be running at any given time
  15. Service A Service is a kubernetes object that enables communication

    between various deployment within the cluster and It can also enable users to communicate with applications running on kubernetes.
  16. Ingress An Ingress is an API object that manages external

    access to the services in a cluster, typically HTTP. It may provide load balancing, SSL termination and name-based virtual hosting. It acts like a "smart router" that routes to different service depending on the domain configure. It can be considered as a smart Loadbalancer.
  17. Loadbalancer A Loadbalancer helps to efficiently distribute incoming network traffic

    across a multiple instances of an application (or servers).
  18. Ingress vs Loadbalancers Service test.example.com example.com/api example.com/videos another-domain.com INGRESS Service

    Service Service Service LoadBalancer Traffic Traffic POD POD POD POD POD POD POD POD POD POD
  19. Secrets Secrets are used to store sensitive information, like passwords

    or keys. They are similar to configMaps, except that they are stored in an encoded or hashed format.
  20. Summary - Compatibility Hell - Containers - Containers vs VMs

    - Container Orchestration - Node / Master Node - Cluster - Kubernetes - Pod - ReplicaSet - Deployment - Service - Ingress - ConfigMaps - Secrets