top of page

What is Kubernetes


Kubernetes (K8s) is an open-source platform used to manage, scale, and run containerized applications automatically.


Kubernetes is a container orchestration tool that automates deployment, scaling, networking, and management of containers.

Kubernetes Architecture




When You Work Only With Docker

docker run myapp

What happens?

  1. Docker pulls image

  2. Creates container

  3. Runs on one machine only

  4. If it crashes → you restart manually

  5. If you want 3 containers → you run command 3 times

  6. No automatic load balancing


Kubernetes = Manages containers automatically across machines

In Docker you type:

docker run


In Kubernetes you type:

kubectl apply -f app.yaml


We need to start Kubernetes from Docker like below ,




API Server (Brain of Kubernetes)


Everything goes through API Server.


  • Accepts your YAML file

  • Stores configuration

  • Tells cluster what to do


YAML file


etcd (The Memory)

In Docker:There is no central memory storing desired state.

In Kubernetes


etcd stores everything

Example:

  1. You said: "I want 3 replicas"

  2. That info is stored in etcd


Even if master restarts → configuration is safe.


Scheduler (Decision Maker)

Now question:Where should the container run?

If you have:

  1. Worker Node 1

  2. Worker Node 2

Scheduler decides which node has CPU/RAM available.


Controllers (Auto-Healing System)

Controllers constantly check:

Is actual state matching desired state?

Example:

  1. You said 3 pods

  2. One pod crashes

  3. Controller sees only 2 running

  4. Automatically creates 1 new pod


This is called:

Self Healing

Docker alone cannot do this automatically.


Worker Node

Worker node is where actual containers run.

Each worker node has:


Kubelet (Node Manager)

Think of Kubelet as:

The manager of that machine

It:


Talks to API server

  1. Creates pods

  2. Ensures containers are running

  3. Reports health

Container Runtime (Docker)


Earlier Kubernetes used Docker directly.

Now it uses container runtimes like:

containerd

CRI-O

But concept same.

This actually runs the container.


Pod (Very Important)


In Docker:Container = smallest unit

In Kubernetes:Pod = smallest unit


Pod contains:

  1. One or more containers

  2. Shared network

  3. Shared storage


Normally:1 Pod = 1 container


kube-proxy (Networking)

Handles:

  1. Internal communication

  2. Load balancing between pods


If 3 pods running:Traffic is automatically distributed.


$50

Product Title

Product Details goes here with the simple product description and more information can be seen by clicking the see more button. Product Details goes here with the simple product description and more information can be seen by clicking the see more button

$50

Product Title

Product Details goes here with the simple product description and more information can be seen by clicking the see more button. Product Details goes here with the simple product description and more information can be seen by clicking the see more button.

$50

Product Title

Product Details goes here with the simple product description and more information can be seen by clicking the see more button. Product Details goes here with the simple product description and more information can be seen by clicking the see more button.

Recommended Products For This Post
 
 
 

Recent Posts

See All

Comments


© 2023 by newittrendzzz.com 

  • Facebook
  • Twitter
  • Instagram
bottom of page