Cloud Native 9 min read

Demystifying Kubernetes: Master-Node Communication, Pod Scheduling & Scaling

This article walks through the fundamental concepts of Kubernetes, explaining how the master node communicates with workers, how pods are scheduled onto nodes, where cluster state is stored, how services expose pods externally, and how replication controllers enable dynamic scaling.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Demystifying Kubernetes: Master-Node Communication, Pod Scheduling & Scaling

Docker is a familiar container technology that is easy to start with a Docker Engine on a host, allowing actions such as pulling images, creating containers, mounting data, and mapping ports. Compared to Kubernetes (K8s), Docker is much simpler.

Kubernetes is a distributed cluster management system built on container technology, originating from Google’s large‑scale container experience. To support massive clusters it includes many components and inherent distributed complexity, and its reliance on Google‑hosted images adds extra setup difficulty for users in China.

Question 1: How do the master and worker nodes communicate?

When the master node starts, it runs the kube-apiserver process, which provides the cluster management API and central security mechanisms. On each worker node, the kubelet process reports node status to the master and receives commands to create Pods.

A Pod is the basic unit in Kubernetes; it may contain one or more containers that share a network namespace, allowing them to communicate via localhost. Each Pod starts a pause container that holds the shared network settings for the other containers.

Question 2: How does the master schedule Pods onto specific Nodes?

The kube-scheduler performs this task, running algorithms (e.g., round‑robin) to select the best Node for each Pod. To force a Pod onto a particular Node, you can match Node labels with the Pod’s nodeSelector attribute.

Question 3: Where is information about Nodes and Pods stored, and who maintains it?

Kubernetes uses the etcd component as a highly available, strongly consistent key‑value store for all cluster configuration and state data. All read/write operations on this data go through the kube-apiserver, which also exposes a REST API for internal components and external users (e.g., via kubectl).

Question 4: How do external users access Pods running inside the cluster?

Instead of exposing each container directly, Kubernetes groups identical Pods into a Service. Pods are labeled, and the Service selects Pods with matching labels. The Service information is stored in etcd via the Apiserver, and a kube-proxy process on each node handles address translation and load balancing.

Question 5: How are Pods dynamically scaled up or down?

Scaling is achieved by the Replication Controller, which maintains a desired replica count for each Pod. When the actual number of Pods differs from the desired count, the controller creates or deletes Pods to match the target.

Question 6: How do the various components cooperate?

The kube-controller-manager runs multiple controllers (Node, ResourceQuota, Namespace, Service, Replication, etc.). It watches the shared cluster state via the Apiserver and attempts to reconcile the actual state with the desired state for each controller.

Summary

The article provides a high‑level overview of core Kubernetes concepts without deep implementation details, covering:

Node

Pod

Label

Selector

Replication Controller

Service Controller

ResourceQuota Controller

Namespace Controller

Node Controller

Key processes include:

kube-apiserver

kube-controller-manager

kube-scheduler

kubelet

kube-proxy

pause

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.

Cloud NativeKubernetesservice discoverycontainer orchestrationPod Scheduling
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

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.