Why Kubernetes Became the Backbone of Modern Cloud Native Architecture
This article introduces Kubernetes from a beginner’s perspective, covering its historical background, core design principles, architecture components such as Master and Node, key concepts like declarative APIs, containers, Pods, Services, and demonstrates how to create clusters, deploy, scale, and update applications, while also highlighting its role in cloud‑native environments.
Background
Kubernetes has become very popular in recent years, offering powerful container orchestration capabilities. Combined with the DevOps concept, it enables developers to easily operate complex distributed systems, breaking the traditional boundary between development and operations.
PaaS
PaaS provides “application hosting” capabilities. Early approaches involved renting VMs from AWS or OpenStack and manually deploying applications, which raised consistency challenges between local and cloud environments. PaaS offered a better solution.
For example, Cloud Foundry allows users to package applications in language‑specific formats and upload them to a storage service; a scheduler then runs the containers on suitable VMs.
Distributed Systems
As software scales, architectures have evolved from monoliths to SOA, micro‑services, and now Service Mesh or Serverless. Modern back‑ends consist of many services, making deployment and operation complex.
Container Technology
Docker solved the “environment mismatch” problem by packaging the entire OS filesystem into an image, ensuring consistency between development and production. Docker’s success led to the rise of CaaS solutions.
Containers use namespaces for isolation and cgroups for resource limits; Docker implements these with layered UnionFS images.
Kubernetes
Before Kubernetes, tools like Compose, Swarm, and Machine could orchestrate containers, but they fell short for large‑scale systems. Kubernetes, originating from Google’s Borg, provides open‑source, high‑level orchestration for multi‑host container workloads.
Design Principles
Declarative vs Imperative
Declarative APIs let you state the desired end state, and the system drives toward it, similar to SQL. Example YAML shows a Deployment definition:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: etcd-operator
spec:
replicas: 1
template:
metadata:
labels:
name: etcd-operator
spec:
containers:
- name: etcd-operator
image: quay.io/coreos/etcd-operator:v0.2.1
env:
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.nameDeclarative APIs make systems more robust in distributed environments.
Explicit API
Kubernetes exposes the same API internally and externally, allowing custom extensions when built‑in components are insufficient.
Non‑intrusive
Applications packaged as images can run on Kubernetes without code changes, and Kubernetes can inject Secrets, ConfigMaps, and other runtime parameters.
Stateful Migration
Kubernetes separates storage from compute using PersistentVolume (PV) and PersistentVolumeClaim (PVC), enabling portable stateful workloads across clusters.
Architecture
Master
The Master node runs etcd, API Server, Controller Manager, and Scheduler, providing the control plane for the cluster.
Node
Node machines run Pods and host the kubelet, kube-proxy, and a container runtime such as Docker.
Implementation Basics
Creating a Cluster
A Kubernetes cluster consists of one or more Masters and multiple Nodes. The Master schedules Pods onto Nodes. Tools like Minikube can create a single‑node cluster for local testing.
Deploying an Application
Deployments describe how to run containers. The Deployment controller ensures the desired number of Pods are running and replaces failed Pods automatically.
Viewing Pods and Nodes
Pods are logical hosts for one or more containers sharing network and storage. Each Pod runs on a Node.
Service and LabelSelector
Services provide stable network endpoints for a set of Pods, handling load balancing and service discovery. Different Service types (ClusterIP, NodePort, LoadBalancer, ExternalName) expose the service in various ways.
Scaling Applications
Adjusting the replicas field in a Deployment scales the number of Pods; Kubernetes creates or removes Pods to match the desired count.
Updating Applications
Changing the container image in a Deployment triggers a rolling update, supporting strategies such as blue‑green or canary deployments, and enables rollbacks.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
