Kubernetes (K8s) is an open-source platform for automating the deployment, scaling, and management of containerized applications. Designed based on Google’s 15 years of experience running production workloads, it is now managed by the CNCF (Cloud Native Computing Foundation).

Why do you need Kubernetes?

Building containers with Docker is not the end of the story. In real production environments, you need to deploy and manage dozens or hundreds of containers across multiple servers.

Problems with containers aloneAfter adopting Kubernetes
Manual restart when container diesAutomatic recovery (Self-healing)
Manual container addition when traffic increasesAutomatic scaling (HPA) adjusts Pod count
Manual management when deploying across serversDeclarative deployment maintains desired state
Configure load balancing manuallyAutomatic load balancing with Service
Write rolling update scriptsAutomated zero-downtime deployment with Deployment
Complex config/secret managementCentralized management with ConfigMap/Secret

Kubernetes solves various container operation problems through automation and declarative configuration.

Core Features of Kubernetes

Kubernetes provides the following key capabilities:

1. Declarative Configuration Instead of saying “run 3 containers,” you declare “maintain a state where 3 containers are running.” Kubernetes continuously monitors the current state and takes automatic actions to match the desired state.

2. Self-healing Automatically restarts failed containers and reschedules Pods from dead nodes to other nodes. Containers that don’t respond to health checks are removed from service.

3. Horizontal Scaling Automatically adjusts the number of Pods based on CPU usage, memory, or custom metrics. Enables flexible response to traffic increases.

4. Service Discovery and Load Balancing Access Pods reliably through Service even when Pod IPs change. Automatically distributes traffic across multiple Pods.

When should you use Kubernetes?

Kubernetes adoption should consider team size, service complexity, and operational capabilities.

Suitable cases:

  • Microservices architecture with multiple separated services
  • High traffic variability requiring automatic scaling
  • Multi-cloud or hybrid cloud strategy
  • Frequent need for zero-downtime deployments and rollbacks
  • Team with DevOps/SRE capabilities

May be overkill:

  • Operating only 1-2 monolithic applications
  • Predictable traffic with little variability
  • Team lacking container/cloud experience
  • Managed services (AWS ECS, Google Cloud Run, etc.) are sufficient

What This Guide Covers#

This guide is structured step-by-step for backend developers to apply Kubernetes in practice.

Quick Start Deploy an application to Kubernetes in 5 minutes. See a working environment before diving into concepts.

Concepts

Explains Kubernetes core principles from a backend developer’s perspective.

TopicWhat you’ll learn
ArchitectureComponents and roles of Control Plane, Worker Node
PodKubernetes’ minimum deployment unit, container grouping
DeploymentApplication deployment and update strategies
ServiceNetwork access to Pods and load balancing
ConfigMap and SecretSeparating configuration and sensitive information
Volume and StoragePersistent data storage and PV/PVC
NetworkingIntra/external cluster communication and Ingress
Resource ManagementCPU/memory requests and limits
ScalingAuto-scaling with HPA, VPA
Health ChecksLiveness, Readiness, Startup Probe

Hands-on Examples

Practice with executable examples:

How-To Guides

Step-by-step guides for solving specific problems:

Appendix

  • Glossary - Quick reference for Kubernetes terms
  • FAQ - Frequently asked questions
  • References - Official documentation and additional learning resources

Docker vs Kubernetes#

Docker and Kubernetes are tools for different domains. Docker creates and runs containers, while Kubernetes is an orchestration platform that manages multiple containers.

ItemDockerKubernetes
RoleContainer runtimeContainer orchestration
ScopeSingle hostMultiple hosts (cluster)
Deploymentdocker runDeployment, Pod
NetworkingBridge networkCluster network, Service
ScalingManualAutomatic (HPA)
Failure recoveryNone (--restart flag)Automatic (Self-healing)
Load balancingConfigure manuallyAutomatic with Service

The typical workflow is building images with Docker, then Kubernetes deploying and managing those images in a cluster. Note that since Kubernetes v1.24, container runtimes like containerd or CRI-O are used instead of Docker (Dockershim support ended).

Note: Kubernetes dropping Docker support doesn’t mean you can’t use Docker images. OCI-compatible images built with Docker run on all container runtimes.

Prerequisites#

The following knowledge is needed to effectively learn this guide:

  • Required: Docker basics (images, containers), Linux commands
  • Helpful: YAML syntax, network fundamentals (IP, ports, DNS), REST API development experience

Learning Path Guide#

The most efficient learning order varies by role and goals:

Learning paths by role

flowchart TD
    Start[Start] --> Role{Select Role}

    Role -->|Backend Developer| BE[Application deployment focused]
    Role -->|DevOps/SRE| DO[Operations/automation focused]
    Role -->|Team Lead| TL[Architecture decisions focused]

    BE --> BE1[Quick Start]
    BE1 --> BE2[Pod, Deployment, Service]
    BE2 --> BE3[ConfigMap/Secret]
    BE3 --> BE4[Health Checks]
    BE4 --> BE5[Spring Boot Deployment]

    DO --> DO1[Architecture]
    DO1 --> DO2[Resource Management]
    DO2 --> DO3[Scaling]
    DO3 --> DO4[Networking]
    DO4 --> DO5[Monitoring]

    TL --> TL1[Architecture]
    TL1 --> TL2[Resource Management]
    TL2 --> TL3[Networking]
    TL3 --> TL4[Scaling]

Documents by difficulty level

DocumentDifficultyEstimated timePrerequisites
Quick Start⭐ Beginner30 minNone
Architecture⭐ Beginner30 minNone
Pod⭐ Beginner30 minQuick Start
Deployment⭐⭐ Basic45 minPod
Service⭐⭐ Basic45 minPod
ConfigMap/Secret⭐⭐ Basic30 minPod
Basic Examples⭐⭐ Basic60 minDeployment, Service
Health Checks⭐⭐⭐ Intermediate30 minPod, Deployment
Volume and Storage⭐⭐⭐ Intermediate45 minPod
Resource Management⭐⭐⭐ Intermediate45 minPod, Deployment
Networking⭐⭐⭐ Intermediate60 minService
Spring Boot Deployment⭐⭐⭐ Intermediate90 minBasic Examples
Scaling⭐⭐⭐⭐ Advanced60 minDeployment, Resource Management
Pod Troubleshooting⭐⭐⭐⭐ Advanced45 minPod, Health Checks

Each document can be read independently, but if you’re new, we recommend the order above.

Common Misconceptions#

Here are frequently heard misconceptions about Kubernetes:

“Kubernetes is only for large enterprises” — Not true. Lightweight distributions like Minikube, Kind, and k3s can be used in development environments or small-scale production. Using cloud managed services (EKS, GKE, AKS) significantly reduces operational burden.

“You need a DevOps team to use Kubernetes” — Cloud managed services greatly reduce cluster operation burden. Developers can also handle basic deployment and scaling themselves.

“Kubernetes is easy if you know Docker” — Docker knowledge helps, but Kubernetes requires additional learning about distributed systems. You need to understand new concepts like networking, storage, and scheduling.

“All applications should run on Kubernetes” — Not true. Stateful workloads like databases have less operational burden when using managed services (RDS, Cloud SQL). Kubernetes’ strengths are maximized with stateless applications.