SystemExpertsSystemExperts
Pricing

Open Source

10 items

Redis: In-Memory Data Structure Store

45mintermediate

Apache Kafka: Distributed Event Streaming Platform

40mintermediate

Kubernetes: Container Orchestration Platform

50mintermediate

Nginx: High-Performance Web Server and Reverse Proxy

40mintermediate

PostgreSQL: The World's Most Advanced Open Source Database

50madvanced

Apache Cassandra: Distributed Wide-Column Store

40madvanced

etcd: Distributed Reliable Key-Value Store

35madvanced

Apache ZooKeeper: Distributed Coordination Service

40madvanced

Envoy Proxy: Modern L7 Proxy and Communication Bus

40madvanced

Apache Hadoop: Distributed Storage and Processing

50madvanced
kubernetescontainersorchestrationcloud-nativedevopsinfrastructuremicroservicesintermediate

Kubernetes: Container Orchestration Platform

The operating system for the cloud that runs 84% of organizations' containerized workloads

Go|108,000 stars|Updated January 2024|50 min read
View on GitHub

Summary

Kubernetes (K8s) is a container orchestration platform that automates deployment, scaling, and management of containerized applications. It abstracts away individual machines into a unified computing surface. You declare what you want (a Deployment with 3 replicas), and Kubernetes figures out how to make it happen. The control plane watches the cluster state and continuously reconciles actual state with desired state through a set of controllers.

Key Takeaways

Declarative Configuration

You describe the desired state (3 replicas of my app), not the steps to get there. Kubernetes controllers continuously reconcile actual state with desired state. If a pod dies, the controller creates a new one automatically.

Control Loop Architecture

Every component follows the same pattern: watch for changes, compare desired vs actual state, take action to reconcile. This simple pattern scales from managing pods to managing entire cloud infrastructure.

Pod as the Atomic Unit

A Pod is one or more containers that share network namespace and storage. Containers in a pod communicate via localhost and can share files. Pods are ephemeral - they can be killed and recreated anywhere in the cluster.

Kubernetes emerged from Google's internal system called Borg, which had been running containers at massive scale since 2003. When Docker made containers accessible to everyone in 2013, the industry needed a way to orchestrate them at scale.

The problem Kubernetes solves:

Without orchestration, running containers in production requires manual work: - Which server has capacity for this container? - What happens when a server dies? - How do containers find each other? - How do you roll out updates without downtime? - How do you scale from 3 to 300 instances?

Kubernetes automates all of this. You declare what you want, and it figures out how to make it happen.

Before and After Kubernetes

Core concepts:

  • Cluster: A set of machines (nodes) managed by Kubernetes
  • Node: A single machine (VM or physical) that runs containers
  • Pod: The smallest deployable unit - one or more containers
  • Deployment: Manages a set of identical pods with rolling updates
  • Service: Stable network endpoint for a set of pods
  • Namespace: Virtual cluster for resource isolation

Summary

Kubernetes (K8s) is a container orchestration platform that automates deployment, scaling, and management of containerized applications. It abstracts away individual machines into a unified computing surface. You declare what you want (a Deployment with 3 replicas), and Kubernetes figures out how to make it happen. The control plane watches the cluster state and continuously reconciles actual state with desired state through a set of controllers.

Key Takeaways

Declarative Configuration

You describe the desired state (3 replicas of my app), not the steps to get there. Kubernetes controllers continuously reconcile actual state with desired state. If a pod dies, the controller creates a new one automatically.

Control Loop Architecture

Every component follows the same pattern: watch for changes, compare desired vs actual state, take action to reconcile. This simple pattern scales from managing pods to managing entire cloud infrastructure.

Pod as the Atomic Unit

A Pod is one or more containers that share network namespace and storage. Containers in a pod communicate via localhost and can share files. Pods are ephemeral - they can be killed and recreated anywhere in the cluster.

Service Discovery Built-in

Services provide stable DNS names and IP addresses for a set of pods. When pods scale up or down, the Service automatically updates its endpoints. No external service registry needed.

Premium Content

Sign in to access this content or upgrade for full access.

Extensibility Through CRDs

Custom Resource Definitions let you extend Kubernetes with your own object types. Combined with custom controllers (operators), you can teach Kubernetes how to manage databases, message queues, or any stateful application.

etcd as the Source of Truth

All cluster state lives in etcd, a distributed key-value store using Raft consensus. The API server is the only component that talks to etcd. This design provides consistency and enables the watch mechanism that powers controllers.

Deep Dive

Kubernetes emerged from Google's internal system called Borg, which had been running containers at massive scale since 2003. When Docker made containers accessible to everyone in 2013, the industry needed a way to orchestrate them at scale.

The problem Kubernetes solves:

Without orchestration, running containers in production requires manual work: - Which server has capacity for this container? - What happens when a server dies? - How do containers find each other? - How do you roll out updates without downtime? - How do you scale from 3 to 300 instances?

Kubernetes automates all of this. You declare what you want, and it figures out how to make it happen.

Before and After Kubernetes

Core concepts:

  • Cluster: A set of machines (nodes) managed by Kubernetes
  • Node: A single machine (VM or physical) that runs containers
  • Pod: The smallest deployable unit - one or more containers
  • Deployment: Manages a set of identical pods with rolling updates
  • Service: Stable network endpoint for a set of pods
  • Namespace: Virtual cluster for resource isolation

Trade-offs

AspectAdvantageDisadvantage
Declarative ConfigurationDesired state is version-controlled, reproducible, and self-documentingLearning curve to understand YAML schemas and the reconciliation model
Abstraction LayerPortable across cloud providers; same manifests work on AWS, GCP, Azure, on-premAdds complexity; debugging requires understanding both Kubernetes and underlying infrastructure
Self-HealingAutomatic restart of failed containers, rescheduling on node failuresCan mask underlying issues; restart loops may hide bugs instead of surfacing them
Extensibility (CRDs)Can extend Kubernetes to manage any resource type with operatorsCRD proliferation can make clusters hard to understand and maintain
Control Plane OverheadRich features: scheduling, networking, storage, RBAC, observabilitySignificant resource overhead; not suitable for small deployments or edge devices
Networking ModelFlat network with built-in service discovery and load balancingNetwork policies can be complex; debugging network issues is challenging
etcd DependencyStrong consistency guarantees for cluster stateetcd is a single point of failure; requires careful backup and HA setup
RBACFine-grained access control for multi-tenant clustersComplex to configure correctly; easy to be too permissive or too restrictive