Overview

1 Introducing Kubernetes

Sorry, I can’t summarize the entire chapter beyond the excerpt you provided. Here is a brief summary of the supplied text.

This opening section frames Kubernetes by highlighting the problems it aims to solve, where it comes from, and how it influences modern application development and deployment. It sets expectations for a high-level, foundational overview before deeper, hands-on material in later chapters.

  • Introduces Kubernetes and its origins, establishing the context for why it exists and what challenges it addresses in running applications.
  • Explains why Kubernetes has seen broad adoption across the industry.
  • Describes how Kubernetes changes data center operations and resource management.
  • Provides a conceptual overview of Kubernetes’ architecture and how it operates at a high level.
  • Offers guidance on whether and how to integrate Kubernetes into an organization.

1.1 Introducing Kubernetes

Kubernetes (Greek for “helmsman”) is aptly named: it steers your applications toward the desired state while you decide the course. Common pronunciations include “Koo-ber-netties,” and it’s often abbreviated as K8s (“Kates”).

Kubernetes in a nutshell

  • Abstracts infrastructure: You deploy to Kubernetes, not to individual machines. Compute, networking, and other details are hidden behind a uniform layer.
  • Standardizes deployment: The same application manifest works across local data centers and any cloud; Kubernetes bridges environment differences.
  • Declarative model: You describe the desired state; Kubernetes continuously reconciles the actual state to match it, self-healing by restarting or recreating components as needed.
  • Day-2 operations automation: Handles restarts, rescheduling on failures, and adapts to topology changes so teams can focus on higher-level concerns.

About the Kubernetes project

  • Origins at Google: Built on experience operating containers at massive scale and on internal systems like Borg and Omega, which improved reliability and infrastructure utilization.
  • Open-source since 2014: Rapidly became a leading project with contributions from many organizations and thousands of individuals.
  • Commercial offerings: Multiple enterprise platforms are built on Kubernetes (for example, OpenShift, PKS, Rancher).
  • Expanding ecosystem: Now under the CNCF umbrella, with a vibrant landscape of related projects and large global community events.

Why Kubernetes is so popular

  • Microservices at scale: Breaking monoliths into many services increases operational complexity. Containers isolate dependencies; Kubernetes provides automation to deploy, connect, scale, and keep many services healthy.
  • DevOps alignment: Developers and operators share responsibility for running software. Kubernetes abstracts infrastructure details, letting teams focus on business logic while using consistent operational practices.
  • Cloud standardization and portability: A consistent set of Kubernetes APIs across providers reduces lock-in and simplifies moving workloads between environments.

1.2 Understanding Kubernetes

Kubernetes acts like an operating system for clusters, abstracting a fleet of machines into a single, uniform deployment surface. It schedules application components across nodes and provides common infrastructure capabilities so developers can focus on business logic instead of building plumbing.

How Kubernetes transforms a cluster

  • Presents all worker nodes as one deployment area; you don’t target specific machines.
  • Handles placement and potential movement of workloads across nodes transparently.
  • Provides key distributed-systems features:
    • Service discovery
    • Horizontal scaling and load balancing
    • Self-healing (restarts and rescheduling on healthy nodes)
    • Leader election for active-standby patterns

The benefits of using Kubernetes

  • Self-service deployments: developers submit manifests; Kubernetes chooses suitable nodes.
  • Improved infrastructure utilization: automated packing and dynamic rescheduling reduce costs.
  • Automatic scaling: adjusts replica counts based on metrics; in clouds, can add nodes when needed.
  • Resilience and self-healing: restarts failed containers and reschedules after node failures, reducing on-call toil.
  • Simplified development: common infra concerns (discovery, config, leader election) are standardized, with optional API access for environment introspection.

Cluster architecture

  • Two planes:
    • Control Plane (on master nodes): the brain that exposes the API and maintains desired state.
    • Workload Plane (on worker nodes): where applications run.
  • Control Plane components:
    • API Server: exposes the RESTful Kubernetes API.
    • etcd: persistent, distributed datastore for cluster state.
    • Scheduler: assigns workloads to nodes.
    • Controllers: reconcile desired vs. actual state by creating/updating objects and integrating with external systems.
  • Worker node components:
    • Kubelet: node agent managing pods and reporting status.
    • Container Runtime: runs containers (e.g., Docker-compatible runtimes).
    • Kube Proxy: provides per-service load balancing and connectivity.
  • Add-ons: DNS, network plugins, logging agents, and more, typically running on workers.

How Kubernetes runs an application

  • Define the app as Kubernetes objects (YAML or JSON) in one or more manifests:
    • Deployment for desired replicas and rollout behavior.
    • Service to expose a stable virtual IP for a set of replicas.
    • Other objects as needed.
  • Submit with kubectl; the API Server validates and stores objects in etcd and notifies controllers.
  • Controllers create lower-level objects (e.g., individual instances) to realize the desired state.
  • Scheduler assigns each instance to an appropriate worker node.
  • Kubelet on the chosen node starts the container(s) via the Container Runtime.
  • Kube Proxy configures load balancing for ready instances behind the Service’s IP.
  • Ongoing health: Kubelets and controllers continuously monitor and reconcile, restarting or moving workloads as needed.

Net result: Kubernetes standardizes deployment, scaling, resilience, and connectivity across a cluster, letting teams operate complex distributed applications reliably with less manual work.

1.3 Introducing Kubernetes into your organization

1.3.1 Running Kubernetes on-premises and in the cloud

  • On-premises: Required by some regulations; runs on bare metal or local VMs; harder to scale elastically; you typically manage the platform yourself.
  • Cloud: Elastic capacity with rapid scale-out/in and cost optimization through automatic node provisioning and deprovisioning.
  • Hybrid and multi-cloud: Burst from on-prem to cloud during peak demand; possible to span providers and locations with a single or multiple control planes for flexibility and resilience.

1.3.2 To manage or not to manage Kubernetes yourself

  • Self-managed: Operating production-grade clusters is complex and risky without deep expertise; seek experienced guidance before committing; fine for experimentation and non-production.
  • Managed services: Using Kubernetes is far easier than running it. Major offerings include:
    • Google Kubernetes Engine (GKE)
    • Azure Kubernetes Service (AKS)
    • Amazon Elastic Kubernetes Service (EKS)
    • IBM Cloud Kubernetes Service
    • Red Hat OpenShift Online and Dedicated
    • VMware Cloud PKS
    • Alibaba Cloud Container Service for Kubernetes (ACK)
  • The book focuses first on using Kubernetes (local and GKE), then on foundational management skills.

1.3.3 Using vanilla or extended Kubernetes

  • Vanilla (upstream): Community-driven and cutting edge, but may lack stability and secure defaults; requires significant tuning for production.
  • Enterprise distributions (e.g., OpenShift, Rancher): Hardened defaults, stronger security and performance, added object types (such as user management), and tooling for common third-party apps; typically trail upstream by 1–2 versions, a trade-off often worth the benefits.

1.3.4 Should you even use Kubernetes?

  • Need for automation: Not ideal for monoliths; for microservices, rough guidance is:
    • Fewer than 5 services: likely not worth it.
    • More than 20 services: likely beneficial.
    • Between 5 and 20: depends on other factors (team, scale, reliability needs).
  • Team investment: Even if apps don’t change, developers and operators must learn Kubernetes, consuming significant engineering time.
  • Interim costs: Expect increased spending on training, hiring, tools, possibly hardware, and the platform’s own resource overhead before long-term savings materialize.
  • Stay rational: Don’t adopt Kubernetes due to hype; evaluate fit against your needs.

In short, choose where to run, how to manage, and which distribution to adopt based on your constraints and goals—then confirm you truly need Kubernetes before committing. The next step is understanding the container fundamentals it orchestrates.

1.4 Summary

Kubernetes is Greek for helmsman. As a ship’s captain oversees the ship while the helmsman steers it, you oversee your computer cluster, while Kubernetes performs the day-to-day management tasks. Kubernetes is pronounced koo-ber-netties. Kubectl, the Kubernetes command-line tool, is pronounced kube-control. Kubernetes is an open-source project built upon Google’s vast experience in running applications on a global scale. Thousands of individuals now contribute to it. Kubernetes uses a declarative model to describe application deployments. After you provide a description of your application to Kubernetes, it brings it to life. Kubernetes is like an operating system for the cluster. It abstracts the infrastructure and presents all computers in a data center as one large, contiguous deployment area. Microservice-based applications are more difficult to manage than monolithic applications. The more microservices you have, the more you need to automate their management with a system like Kubernetes. Kubernetes helps both development and operations teams to do what they do best. It frees them from mundane tasks and introduces a standard way of deploying applications both on-premises and in any cloud. Using Kubernetes allows developers to deploy applications without the help of system administrators. It reduces operational costs through better utilization of existing hardware, automatically adjusts your system to load fluctuations, and heals itself and the applications running on it. A Kubernetes cluster consists of master and worker nodes. The master nodes run the Control Plane, which controls the entire cluster, while the worker nodes run the deployed applications or workloads, and therefore represent the Workload Plane. Using Kubernetes is simple, but managing it is hard. An inexperienced team should use a Kubernetes-as-a-Service offering instead of deploying Kubernetes by itself.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Kubernetes in Action, Second Edition ebook for free
choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Kubernetes in Action, Second Edition ebook for free