📦

Google Kubernetes Engine Lecture Notes

Jul 27, 2024

Leveraging Google Kubernetes Engine (GKE)

Overview

  • GKE provides a blend of infrastructure as a service (IaaS) and platform as a service (PaaS).
  • Ideal for those needing managed infrastructure with a developer-friendly platform.
  • Suitable for workloads that are containerized and do not require kernel changes or non-Linux OS.
  • No need to manage servers or infrastructure directly with GKE.

Comparison: IaaS vs. PaaS

  • IaaS (e.g., Compute Engine)
    • Virtualizes hardware via VMs.
    • Users can deploy OS, access hardware, and build apps with chosen runtimes and libraries.
    • High flexibility but higher costs and slower scaling.
  • PaaS
    • Provides hosted services and scalable environments.
    • Users write code in self-contained workloads, abstract from hardware specifics.
    • Scales apps by decoupled microservices efficiently but lacks fine-tuning capabilities.

Introduction to Containers

  • Containers combine the scalability of PaaS with the flexibility of IaaS.
  • Uses OS-level virtualization to run multiple isolated systems on a common host OS.
  • Key Features
    • Fast startup (few system calls).
    • Independent scalability of workloads.
    • Encapsulation of app with necessary dependencies.
    • Modular architecture supporting microservices.
    • Efficient deployment and management across multiple hosts.
  • Benefits
    • Rapid scaling and deployment of workloads.
    • Independent scaling of containers and hosts.
    • Efficient resource usage.
    • Supports modular code development and deployment.

Kubernetes and GKE

  • Kubernetes
    • Open-source container orchestration tool.
    • Simplifies management of containerized environments.
    • Supports deployments, rollouts, rollbacks, and monitoring.
    • Built to manage applications at scale.
  • Google Kubernetes Engine (GKE)
    • Managed environment for deploying containerized apps.
    • Built on Kubernetes and runs on managed Compute Engine instances.
    • Automates container management based on CPU, memory specs, etc.
    • Offers flexibility for on-premises, hybrid, or public cloud infrastructure.
  • Use Cases
    • Manages containers as a cluster, scaling them as microservices.
    • Efficient resource management and time-to-market acceleration.

Containerization at Google

  • All Google services (Gmail, Search, Maps, etc.) run in containers.
  • Launches over 2 billion containers per week.
  • Docker
    • A tool to encapsulate applications and dependencies into containers.
    • Ensures portability across different environments (laptop, server, cloud).

Summary

  • GKE provides a powerful orchestration system leveraging Kubernetes for efficient management and scaling of containerized applications.