Hitesh Sahu
Hitesh SahuHitesh Sahu
  1. Home
  2. ›
  3. posts
  4. ›
  5. …

  6. ›
  7. 3.1 Kunernated

Loading ⏳
Fetching content, this won’t take long…


💡 Did you know?

🦈 Sharks existed before trees 🌳.

🍪 This website uses cookies

No personal data is stored on our servers however third party tools Google Analytics cookies to measure traffic and improve your website experience. Learn more

Cover Image for ☸️ Backend - Kubernetes 📖

☸️ Backend - Kubernetes 📖

Learn the fundamentals of Kubernetes for backend development, including pods, deployments, services, and scaling applications efficiently.

Hitesh Sahu
Written by Hitesh Sahu, a passionate developer and blogger.

Tue Nov 11 2025

Share This on

What is Kubernates

  • Open source container orchastration
  • Developed by Google
  • Help manage Containers in different deployment environment : Physical, Virtual Environment
  • Use of Microservice increased use of container
  • Modern app comproises of 100s of container managed via script which lead to need of orchastration tool

Orchestration

In system administration, orchestration is the automated configuration, coordination, and management of computer systems and software.

Advantage

  • Availability
  • Scalability/High Performance
  • Backup & Recovery

Componnets of Kubernates

Node is a Physical or Virtual Server hosting kubernates

Master Node

Each Master have 4 Process

  1. API Server:
    • Cluster gateway
    • Communicate with Server to update or query from cluster.
    • Request API server to start or schedule a Pod
  2. Scheduler
    • Get request from API server
    • Intelligently decide where to schedule Pod based on Node Load
    • Send request to Kubelet to start Application Pod
  3. Controller Manager
    • Detect Which Pod died and restart
    • Detect state change of Pod and try to recover state of pod
    • Send request to Scheduler to restart a Pod
  4. etcd
    • Cluster brain-> Hold Cluster state which are used by Master processes
    • Cluster changes get stored in key value pair
    • Hold data for Scheduler, Server and Controller Manager
    • Distributed Storage across all master nodes.
  • Need less resource

Worker node/ Node

Each Node must have 3 process

  1. Container run time: eg. Docker
  2. Kubelets Service: Interface for interacting with node and container
  3. Kube Proxy: intellegent forward request.
  • Does the actual Job hence need more resource
  • Each Worker Node can have multiple Pods

Pod

  • Smallest Unit of K8s

  • Abstraction over container.

  • Each Pod get own Internal IP address so that Pods can communicate.

  • When Pod get respawn a new IP address is assigned

  • 1 App per Pod eg 1 pod for DB and 1 Pod for Node App in 1 Node

Service

  • Attach to Pod and Balance Load of Pod
  • Give each pod have a permanent IP address
  • Service and IP address is not affaected by life cycle of Pod
    • External Service
      • Service open comunication with external sources eg App on Browser
    • Internal Service
      • Service not open to Browser eg DB on Browser

Ingress

Forward request to service by changing URL to meaningful address instead of host number

ConfigMap

  • External config to your application
  • Kubernates automatically adjust DB url based on Config App

Secret

  • Used to store credential and certificate in base64 encoded

Volumes

  • Storage on Local or remote cluster persist data
  • K8 dont manage data persistance
  • Pod generates data which gone after pod restart, Volume help with persisting data.

Deployment

  • Help wih App Pod replication.
  • Blueprint used to create Pod, replicate them and Scale them.
  • Abstarction on Top of Pods
  • Replicate App in another node
  • All Pods are connected with service
  • Service will balance load and if one pod dies it pass request to other pod
  • We cant replicate database with Deployment.

Stateful Set

  • Help wih Database Pod replication.
  • Databases must be created with Statefulset not with deployment.
  • Take care of creating DB Pods, replicating them and scale them.
  • Need to take care of DB inconsitancy of DB RW between Stateful sets.

Test Setup

Install Minikube: https://minikube.sigs.k8s.io/docs/start/

Requirement

  • 2 CPUs or more
  • 2GB of free memory
  • 20GB of free disk space
  • Internet connection
  • Container or virtual machine manager, such as: Docker, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMWare

Minikube

  • Virtualize Master and Worker Node Setup
  • Simulate Production Setup of Master and Worker Nodes for Testing
  • Open Source Tool created a Virtual Box on Laptop
  • 1 Node k8s Cluster with Master and Worker Process along with Docker container preinstalled

Kubectl

  • Create various Kubernet componnet in MiniKube via CLI
  • Api Server is the Entry Point which can be communicated via KubeCtl on MiniKube to create and delete component
  • Kubectl can communiate with any type of Cube cluster
Programming/3.1-Kunernated
Let's work together
+49 176-2019-2523
hiteshkrsahu@gmail.com
WhatsApp
Skype
Munich 🥨, Germany 🇩🇪, EU
Playstore
Hitesh Sahu's apps on Google Play Store
Need Help?
Let's Connect
Navigation
  Home/About
  Skills
  Work/Projects
  Lab/Experiments
  Contribution
  Awards
  Art/Sketches
  Thoughts
  Contact
Links
  Sitemap
  Legal Notice
  Privacy Policy

Made with

NextJS logo

NextJS by

hitesh Sahu

| © 2025 All rights reserved.