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

Kubernetes

 Kubernetes

B1a1cc3d71600c6e47c33c65fa08f71f?s=128

Krunal Kapadiya

August 29, 2021
Tweet

More Decks by Krunal Kapadiya

Other Decks in Technology

Transcript

  1. Kubernetes Introduction Krunal Kapadiya @krunal3kapadiya

  2. Agenda - What is Kubernetes - Why Kubernetes - How

    GKE works - Types of Nodes and it’s components
  3. What is Kubernetes The very need to make our complex

    application highly available, scalable, portable, and deployable in small modules independently lead to the birth of Kubernetes Kubernetes is a production-grade open-source container orchestration tool developed by Google to help you manage the containerized/dockerized applications supporting multiple deployment environments like On-premise, cloud, or virtual machines.
  4. None
  5. None
  6. Why Containers

  7. Containers means virtualization inside the operation-system layer • Separates operating

    system from application code and dependencies • Isolates individual processes • Popular implementation include docker Shared Libraries Operating System Virtual Machine Container Code and libraries Container Code and libraries Container Code and libraries
  8. Why use containers? Consistency Across development, Testing and production environment

    Loose coupling Between application and operating system layers Workload Migration Simplified between on-premises and cloud environment Agility Agile development and operations
  9. Why use Kubernetes Engine • Decouples operational, development concerns •

    Manages and maintains ◦ Logging, health management, monitoring • Easily update Kubernetes versions as they are released
  10. None
  11. Kubernetes is a container cluster orchestration system • Automates deployment,

    scaling, and operations for container clusters • OpenSource, based on Google’s experience over 10+ years • Built for a multi-cloud world ◦ Public, private, hybrid
  12. None
  13. Google Container Registry Docker image storage that’s private to your

    GCP project Kubernetes Engine’s complementary services Google Cloud Container Builder Create Docker container images from app code in Google Cloud Storage
  14. None
  15. Kubernetes eases application management • Workload portability ◦ You can

    run many environments, across cloud providers ◦ Implementation is open and modular • Rolling updates ◦ You can upgrade applications without downtime • Persistence storage ◦ Details of how storage is provided are abstracted from how it is consumed
  16. Kubernetes applications are more elastic • Multizone clusters ◦ Run

    a cluster in multiple zones • Load balancing ◦ External IP address routes traffic to correct port • Autoscalling ◦ Automatically adapt to change in workload
  17. Kubernetes Engine manages and run containers • Fully managed cluster

    management and orchestration system for running containers ◦ Based on Kubernetes ◦ Uses compute Engine Instances and resources • Uses declarative syntax to manage applications ◦ Declare desired application configuration, Kubernetes Engine Implementation
  18. Deploying apps: Kubernetes Engine vs App Engine Kubernetes Engine App

    Engine Standard App Engine Flexible Language supports Any Java, Python, Go & PHP Any Service model Hybrid PaaS PaaS Primary use case Container-based workloads Web and mobile applications Web and mobile applications, container- based workloads
  19. None
  20. Worker Node

  21. Worker Node Components Container: Which holds the pods, work proxy

    Pods: Small chunk of application Kube-Proxy: Runs network in each node Container Runtime: Microservice single pod installed in worker node Kubelets: Interact with Node and worker thread - Maintaining a set of pods, which are composed of one or more containers, on a local system. - For registering a node with a Kubernetes cluster, sending events and pod status, and reporting resource utilization. - Kublets takes PodSpecs to check the pods are healthy or not.
  22. Worker Nodes • Who manages these worker nodes, to ensure

    that they are always up and running? • How does the K8s cluster know which pods should be scheduled and which one should be dropped or restarted? • How does the k8s cluster know the resource level requirements of each container app?
  23. Master Node / Control Panel

  24. Master Node/ Control Panel Interaction with worker node for •

    Schedule the pods • Monitor the worker nodes/Pods • Start/restart the pods • Manage the new worker nodes joining the cluster Master Node Processes: • kube-apiserver • kubectl: kube-controller-manager • kube-scheduler • etcd
  25. Master Node/ Control Panel Kube-apiserver: EntryPoint in Master Node, Manages

    worker level resource access request Kube-controller-manager (kubctl): Etcd: Responsible to store cluster level changes, in key-value pair
  26. Kube-controller-manager (kubctl) • Node controller: Responsible to respond when any

    worker node goes down • Replication controller: It ensures that the request to maintain the correct replica count of any pod deployment is always taken care • Endpoints controller: Populates the Endpoints object viz. Joins, Services & Pods • Service Account & Token controllers: Create default accounts and API access tokens for new namespaces created in the worker node.
  27. Etcd • What kind of resources are available in the

    node? • Did the cluster state change, due to any node failure? • Is cluster health ok?
  28. References - https://cloud.google.com/appengine/docs/the-appengine-environments - https://kubernetes.io/docs/concepts/overview/ - https://kumargaurav1247.medium.com/components-of-kubernetes-architecture -6feea4d5c712

  29. https://krunal3kapadiya.app/ Thank you! Krunal Kapadiya @krunal3kapadiya 29