System Design Space
Knowledge graphSettings

Updated: February 21, 2026 at 11:59 PM

Kubernetes Patterns (short summary)

hard

Source

Book Review

The chapter material is based on a detailed analysis of the book on the blog

Read original

Kubernetes Patterns, 2nd Edition

Authors: Bilgin Ibryam, Roland Huß
Publisher: O'Reilly Media, 2019 (2nd Edition 2023)
Length: 390 pages

Catalog of patterns for K8s: fundamental, behavioral, structural and configuration patterns from Bilgin Ibryam.

Kubernetes Patterns, 2nd Edition - original coverOriginal
Kubernetes Patterns, 2nd Edition - translated editionTranslated

Documentaries

Related book

Cloud Native

Context of cloud-native development: containers, serverless, data management.

Read review

Pattern categories

I

Foundational Patterns

Basic principles: how to containerize applications, manage lifecycles and define health checks.

II

Behavioral Patterns

How applications interact with the platform: batch jobs, scheduled tasks, stateful workloads.

III

Structural Patterns

Organization of containers in Pod: sidecar, ambassador, adapter and other multi-container patterns.

IV

Configuration Patterns

Configuration management: ConfigMaps, Secrets, immutable configuration, configuration templates.

Podcast

Code of Architecture

Discussion of Kubernetes Patterns in the Code of Architecture club podcast

Watch on YouTube

Foundational Patterns

Health Probe

Mechanisms for determining application state:

Liveness Probe

Is the process alive? Restart in case of failure.

Readiness Probe

Are you ready to receive traffic?

Startup Probe

For slow-starting applications.

Predictable Demands

Declaration of resource requirements for proper scheduling:

resources:
  requests:
    memory: "256Mi"
    cpu: "250m"
  limits:
    memory: "512Mi"
    cpu: "500m"

Managed Lifecycle

Graceful shutdown via preStop hooks and SIGTERM handling. PostStart hooks for initialization. Correct signal processing is critical for zero-downtime deployments.

Podcast

Code of Architecture

Continued discussion of Kubernetes Patterns in the podcast

Watch on YouTube

Behavioral Patterns

Related book

Site Reliability Engineering

SRE practices for managing workloads in production.

Read review

Batch Job

Kubernetes Job for run-to-completion tasks. Parallel execution, retry policies, backoff limits. Ideal for data processing, migrations, reports.

Periodic Job (CronJob)

Scheduled cron tasks. Concurrency policies: Allow, Forbid, Replace. History of successful and unsuccessful jobs.

Stateful Service

StatefulSet for stateful applications: databases, message queues. Stable network identities, ordered deployment, persistent storage per pod.

Service Discovery

Kubernetes Services: ClusterIP, NodePort, LoadBalancer. DNS-based discovery (service.namespace.svc.cluster.local). Headless services for StatefulSets.

Sidecar

An additional container extends the functionality of the main one without changing its code.

Logging agentProxySync

Ambassador

Proxy to simplify access to external services. Hides connection complexity.

DB proxyAPI gateway

Adapter

Converts the application's output to a standard format. Useful for legacy systems.

Metrics exporterLog formatter

Init Container

Executes before the main container. Preparing the environment, waiting for dependencies.

DB migrationWait for service

Deep Dive

Designing Distributed Systems

Brendan Burns examines configuration and operational patterns in detail.

Read review

Configuration Patterns

EnvVar Configuration

The simplest way is environment variables. Suitable for a small number of parameters. You can use valueFrom to reference ConfigMaps/Secrets.

Configuration Resource (ConfigMap)

Storing the configuration separately from the image. Mount as files or env vars.

Versioning in Git
Hot reload (with subPath)

Immutable Configuration

Configuration as part of an immutable image. Guarantees consistency between environments. Requires reassembly for changes - trade-off between safety and flexibility.

Secret Management

Kubernetes Secrets for sensitive data. Base64 encoding (not encryption!). Integration with external secret managers: Vault, AWS Secrets Manager, Azure Key Vault.

Podcast

Code of Architecture

Advanced Patterns Podcast Discussion

Watch on YouTube

Advanced Patterns

Controller

Reconciliation loop: observe → diff → act. The basis of all Kubernetes controllers. Custom controllers to automate operations.

Operator

Controller + CRD = domain-specific automation. Codification of operational knowledge. Examples: Prometheus Operator, Strimzi.

Elastic Scale

HorizontalPodAutoscaler by CPU, memory or custom metrics. VerticalPodAutoscaler for right-sizing. KEDA for event-driven scaling.

Self Awareness

Downward API for accessing pod metadata. Pod name, namespace, labels, annotations are available to the application.

Related book

Building Microservices

Patterns of decomposition and communication of interview services.

Read review

Application at System Design interview

Useful Concepts

  • Health probes for zero-downtime deployments
  • Sidecar pattern for cross-cutting concerns
  • StatefulSet for stateful workloads
  • Init containers for dependencies
  • Resource requests/limits for capacity
  • HPA for auto-scaling

Questions where it will be useful

  • “How to deploy a service without downtime?”
  • “How to scale a stateful service?”
  • “How to organize a service mesh?”
  • “How to add logging/tracing?”
  • "How to manage secrets?"

Main conclusions

Patterns - reusable solutions for common tasks in K8s
Health probes are critical for production readiness
Multi-container patterns expand capabilities without changing code
Configuration separated from code - key to portability
Operators codify operational knowledge
Understanding patterns is the basis for architectural decisions

Where to find the book

Enable tracking in Settings

System Design Space

© 2026 Alexander Polomodov