Day 20 - Kubernetes Introduction
Hi there! I'm Dinesh, a passionate Cloud and DevOps enthusiast. I love to dive into the latest new technologies and sharing my journey through blog.
Search for a command to run...
Hi there! I'm Dinesh, a passionate Cloud and DevOps enthusiast. I love to dive into the latest new technologies and sharing my journey through blog.
No comments yet. Be the first to comment.
1. Difference between Docker and Kubernetes Docker → Builds and runs containers.Kubernetes → Orchestrates containers across multiple nodes. Key points: Docker = container runtime. Kubernetes = container orchestration tool. Kubernetes provides auto...
In this session, we learn how to monitor a Kubernetes cluster using Prometheus and Grafana.This is not just theory — there is a GitHub repository containing all installation commands and demo steps.The repo will also be enhanced later with advanced K...
1. What is a ConfigMap in Kubernetes? A ConfigMap is used to store non-sensitive configuration data that your application needs — such as: Database port Connection type Any general configuration values In normal applications (non-Kubernetes), de...
Kubernetes normally supports built-in resources like: Deployment Service Pod ConfigMap Secret Ingress These are called native resources. Sometimes companies (Istio, ArgoCD, Prometheus Operator, Kyverno, etc.) want to add new features that Kub...
1. Why Kubernetes Services Are Needed When a Pod is created in Kubernetes, it receives a dynamic IP address.If the Pod dies and restarts, its IP changes.So other Pods (like checkout → payments) cannot rely on Pod IP because it changes, creating issue...
Kubernetes is considered the future of DevOps.
If you plan a long-term career (“marathon”) in DevOps — not just short CI/CD tasks — learning Kubernetes is essential.
You can get jobs doing basic DevOps tasks (CI/CD, build and release),
but true DevOps engineers are expected to understand container orchestration, which means Kubernetes.
Kubernetes dominates the modern microservices and container world.
Before learning Kubernetes, you must understand containers and Docker.
Because Kubernetes works on top of containers.
You should already know:
What containers are, and how they differ from virtual machines
Container networking and namespace isolation
Why containers are lightweight
How to secure containers
Multi-stage Docker builds and distroless images
📘 In short — get strong with container fundamentals, not just Docker commands.
| Concept | Docker | Kubernetes |
| Type | Container Platform | Container Orchestration Platform |
| Purpose | Build, package, and run containers | Manage, scale, and automate containers |
| Scope | Single host | Cluster of multiple hosts |
| Auto-Healing | ❌ Manual restart needed | ✅ Automatic recovery |
| Auto-Scaling | ❌ Manual scaling | ✅ Automatic scaling (HPA) |
| Enterprise Features | ❌ Limited | ✅ Enterprise-grade support |
So, Kubernetes doesn’t replace Docker — it extends and manages it.
When you use only Docker, several issues arise in real-world production.
Docker runs all containers on one host.
If one container consumes too many resources (CPU/RAM), others may crash.
There’s no way for containers to move between hosts.
🧠 Result: If one node fails, all containers on it fail too.
If a container stops, it stays stopped until manually restarted.
In large systems (10,000+ containers), manual monitoring is impossible.
🧠 Need: A system that automatically detects and restarts failed containers.
When user load increases (e.g., from 10,000 to 1 million users),
containers must scale up.
In Docker, this must be done manually.
Docker also lacks built-in load balancing.
🧠 Need: A platform that can automatically add/remove containers as demand changes.
Docker by itself doesn’t provide:
Load balancers
Firewalls
API gateways
Whitelisting / Blacklisting
Advanced networking / Security policies
Auto-healing / Auto-scaling mechanisms
🧠 Need: A production-ready system that can integrate and automate all this.
Kubernetes was created by Google, inspired by their internal system Borg, and is now maintained by the CNCF (Cloud Native Computing Foundation).
Kubernetes is designed to solve all four Docker limitations.
Kubernetes runs as a cluster of multiple nodes.
If one node fails or is overloaded, pods (containers) are automatically rescheduled to another node.
Supports both Master (Control Plane) and Worker Nodes.
🧠 Result: High availability and fault tolerance.
Kubernetes monitors the health of containers (pods).
If a pod fails, it automatically creates a new pod (even before the old one is completely dead).
Managed through ReplicaSets / Deployments.
🧠 Result: Application stays up even when individual pods fail.
Kubernetes supports Horizontal Pod Autoscaler (HPA).
Based on CPU or memory thresholds (e.g., 80%), Kubernetes automatically creates or removes pods.
You can also manually scale by editing YAML files.
🧠 Result: Application adjusts to user load dynamically.
Kubernetes supports or integrates with:
Load balancers (via Services, Ingress Controllers)
Firewalls and Network Policies
API Gateways
Service Meshes (Istio, Linkerd)
Security Controls (RBAC, Admission Controllers)
Monitoring tools (Prometheus, Grafana)
Logging tools (ELK / EFK)
🧠 Result: Kubernetes is production-ready and enterprise-grade.
Kubernetes is not 100% perfect — it’s still evolving rapidly.
The CNCF community continuously adds new capabilities.
Many open-source tools integrate with Kubernetes:
Prometheus – Monitoring
Grafana – Visualization
Ingress-NGINX / Traefik – Load balancing
Helm – Package management
Podman / Buildpacks – Image building
Each of these tools enhances Kubernetes capabilities.
Kubernetes allows Custom Resources (CRDs) and Controllers,
so organizations can extend its features — e.g.:
Create custom load balancers
Add new resource types
Integrate with 3rd-party tools
Example:
Kubernetes doesn’t provide advanced load balancing by default,
but Ingress Controllers (like NGINX Ingress) were built using CRDs to provide this.
Companies like Netflix, Amazon, Flipkart, PayPal use Kubernetes because:
It automates deployment, scaling, and management.
It provides resiliency and flexibility.
It standardizes infrastructure across environments (cloud, hybrid, on-prem).
Kubernetes ≠ Docker replacement — it uses Docker or container runtimes under the hood.
Kubernetes manages containers at scale.
Kubernetes is cluster-based, not single-host.
It provides Auto-healing, Auto-scaling, Load balancing, and Enterprise-grade control.
It is open-source and backed by the CNCF community.
In the upcoming topics:
Kubernetes Architecture
Pods
Deployments
Services
Ingress Controllers
Admission Controllers
Each topic will build upon today’s foundation.
| Concept | Docker | Kubernetes |
| Platform Type | Container Platform | Container Orchestration Platform |
| Scope | Single Host | Multi-node Cluster |
| Auto-Healing | No | Yes |
| Auto-Scaling | No | Yes (HPA) |
| Enterprise Ready | No | Yes |
| Best For | Local / Small Projects | Production / Large Systems |
In short:
Kubernetes is the brain that manages your containers.
It makes container-based infrastructure scalable, resilient, and production-ready.