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

Kubernetes

 Kubernetes

Krunal Kapadiya

August 29, 2021
Tweet

More Decks by Krunal Kapadiya

Other Decks in Technology

Transcript

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

    GKE works - Types of Nodes and it’s components
  2. 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.
  3. 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
  4. 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
  5. Why use Kubernetes Engine • Decouples operational, development concerns •

    Manages and maintains ◦ Logging, health management, monitoring • Easily update Kubernetes versions as they are released
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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.
  13. 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?
  14. 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
  15. 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
  16. 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.
  17. Etcd • What kind of resources are available in the

    node? • Did the cluster state change, due to any node failure? • Is cluster health ok?