Posts

Showing posts from October, 2026

Understanding Kubernetes YAML: Structure, Templates, Labels, and Selectors

 Today, focus on one common YAML structure , then learn what changes between Pod, ReplicaSet, Deployment, and DaemonSet . Don't try to memorize four YAML files separately. 1. First understand the universal Kubernetes YAML structure Almost every Kubernetes manifest starts like this: apiVersion: kind: metadata: spec: 🧠 Remember: AKMS A piVersion → K ind → M etadata → S pec Think: What API? → What object? → What is its name? → What should it do? 2. Pod YAML Start with the simplest one. apiVersion: v1 kind: Pod metadata: name: nginx-pod spec: containers: - name: nginx-container image: nginx Understand it like this: Pod YAML │ ├── apiVersion: v1 │ ├── kind: Pod │ ├── metadata │ └── name: nginx-pod │ └── spec └── containers └── nginx-container └── image: nginx What do you need to remember? Only this: apiVersion: v1 kind: Pod metadata: name: <pod-name> spec: containers: - name: <container-name> image: <image> The...

Kubernetes Fundamentals: Architecture, Core Components, and Essential kubectl Commands

  Introduction Kubernetes (K8s) is an open-source container orchestration platform used to deploy, manage, scale, and maintain containerized applications. Instead of manually managing individual containers, Kubernetes automates many operational tasks, including: Deploying applications Managing containers Scaling applications Restarting failed workloads Load balancing Service discovery Rolling updates Managing application configuration Scheduling workloads across machines For example, instead of manually running: docker run nginx we can define the desired state in Kubernetes and let Kubernetes manage the application. Kubernetes Architecture at a Glance The basic Kubernetes structure looks like this: Kubernetes Cluster │ ├── Control Plane │ └── Worker Node │ ├── Pod │ └── Container │ ↑ │ Image │ └── Container Runtime └── containerd / CRI-O There is an important relationship to understand here: A Kubernetes cluster contain...