Cloud Native 10 min read

Master Kubernetes: 6-Layer Architecture and 7 Essential Objects Explained

This article provides a clear, visual guide to Kubernetes fundamentals, covering its six-layer abstraction, the roles of Deployments, ReplicaSets, Pods, Nodes, and Docker containers, followed by an overview of seven key API objects that drive container orchestration.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
Master Kubernetes: 6-Layer Architecture and 7 Essential Objects Explained

In this article we introduce the basic concepts of Kubernetes, a platform with many terms that can be intimidating. We help you build a mental model to accelerate your understanding.

1. The 6-layer abstraction of K8s

Deployment

ReplicaSet

Pod

Node Cluster

Node Processes

Docker Container

Deployment creates and manages ReplicaSets, which in turn create and manage Pods. Pods run on Nodes, and each Node hosts multiple Pods. Nodes contain a container runtime that runs applications packaged as Docker images.

The blue part represents high‑level K8s abstractions, while the green part describes the Node and its sub‑processes.

Deployment

If you want to run a stateless application such as an HTTP server continuously, you need a Deployment. Deployments allow seamless upgrades, define restart policies for failed Pods, and can be created via CLI or configuration files.

ReplicaSet

A Deployment creates a ReplicaSet, which ensures the desired number of Pods are running. The ReplicaSet scales Pods based on the metrics defined in the Deployment.

Pod

Pod is the basic building block in K8s. A Pod may contain multiple containers, though usually just one. Pods handle volumes, secrets, and configuration, have a short lifecycle, but can be automatically restarted. When a ReplicaSet scales horizontally, it creates identical Pods that run on Worker Nodes.

Node Cluster

K8s clusters consist of Master Node and Worker Nodes . A Worker Node can run multiple Pods, while the Master manages those Workers.

(1) Worker Node

Worker Node is later referred to simply as Node.

A Node represents a machine, physical or virtual, essentially a server. Multiple Pods run on a Node, and a Pod’s containers share resources such as volumes. Pods are never split across Nodes.

(2) Master Node

The Master (also called Kubernetes Master, Control Plane, etc.) directs Worker Nodes, makes scheduling decisions, responds to events, implements changes, and monitors the cluster.

Node Processes

Both Master and Worker Nodes run sub‑process components.

(1) Master components

API server: the K8s API endpoint.

etcd: distributed key‑value store for cluster state.

scheduler: selects suitable Nodes for new Pods.

kube‑controller‑manager: runs background control loops.

cloud‑controller‑manager: interfaces with cloud providers.

(2) Worker Node components

kubelet: manages everything on the Node and communicates with the API server.

kube‑proxy: routes traffic to the correct Pod, providing load balancing.

Container Runtime (e.g., Docker): downloads images and runs containers.

Docker Container

Applications running on K8s must be packaged in a container; Docker is the most common platform. When creating a Deployment you specify which Docker image the Pods should use. K8s creates Pods that contain the containers, and containers within a Pod share resources such as volumes.

2. The 7 important K8s objects

These objects manage and run Pods that host containers.

ReplicaSet, StatefulSet, DaemonSet

ReplicaSet creates and manages Pods, automatically recreating them on other Nodes if a Node fails. Deployments create ReplicaSets for easy upgrades.

StatefulSet tracks stateful applications (e.g., games) that need persistent identifiers.

StatefulSet

Like ReplicaSet, it manages a set of Pods, but each Pod gets a unique, persistent identity maintained across rescheduling, useful for databases and other stateful services. The state is stored in volumes associated with the StatefulSet.

DaemonSet

Ensures a copy of a Pod runs on every Node, ideal for background tasks such as monitoring or log collection. Unlike ReplicaSet, DaemonSets are not controlled by Deployments.

Job

Manages Pods that run batch jobs, tracking successful completions. Once a job finishes, its Pods are not restarted.

CronJob

Schedules Jobs to run at specified times or intervals (hourly, daily, monthly).

Service

Provides a stable IP address and port for a set of Pods, allowing both external users and internal Pods to communicate consistently.

Volume

A Volume is a directory that can store data, created as part of a Pod and cannot exist independently. Containers in the same Pod can share the Volume. The Volume’s lifecycle is tied to the Pod; when the Pod is deleted, the Volume disappears.

Source: https://towardsdatascience.com/key-kubernetes-concepts-62939f4bc08e1

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DeploymentKubernetesClusterContainersPod
Java High-Performance Architecture
Written by

Java High-Performance Architecture

Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.