DEV Community

Cover image for #028 Kubernetes - Pods
Omar
Omar

Posted on

5 1

#028 Kubernetes - Pods

Introduction

this is part 28 from the journey it's a long journey(360 day) so go please check previous parts , and if you need to walk in the journey with me please make sure to follow because I may post more than once in 1 Day but surely I will post daily at least one 😍.

And I will cover lot of tools as we move on.


Pods

pod

Pod is the smallest component in Kubernetes.
Kubernetes Cluster must have at least 1 master , let's say we have only 1 Node . So this node will be master and worker in same time.
A pod is an encapsulation of container . Why encapsulation? because I don't need my container to run directly , so I can control it using pod.


Load Balancing

Pods

you can't put 2 containers from same type inside one pod , Instead you make another pod.
Why make another one? because if the load balance for 1 container is full or down, another container can serve.

2nodes

you can also put the Pod inside a new complete Node.


Multi-container Pods

multi-pod

You can put 2 containers from different type example python and SQL in 1 pod , but it's not recommended because if 1 Pod down you will loose both app and DB , So it's risky. It's very rare to use 2 containers in 1 Pod , which is container that heavily depend on container 1 , so if container 1 down their is no reason to container 2 be running , Example we have a container process data for web server so if this web server down their is no reason to this container to be running.

Top comments (0)

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay