svg
Post Image

Kubernetes – PODs

In Kubernetes, pods are the smallest deployable units, representing a single instance of a running process in a cluster. Pods serve as the basic building blocks of your application and are where your containers run.

In this article you will learn more about pods.

The Basics

Kubernetes doesn’t deploy directly on a worker note, the containers are encapsulated into a kubernetes object commonly known as Pods.

Pod is a single instance of an application, the smallest object possible to create in Kubernetes.

So what do you do when you start getting more users? You need to scale, add additional instances of your app to share the load.

So we create new pods, but when the node reaches its full capability where do we go next? You can create another node and add more pods to it.

Note: Never add new containers to the same pod, in which the container is equal to an already existing one!

Pods follow a 1-1 relation to containers. Generally they are multi-containers, but never of the same image, per example you can have a flask container and a mysql container in the same pod.

How to deploy pods?

kubectl run nginx --image nginx

It will get the image from Docker Hub.

To get a list of all the pods you can run:

kubectl get pods

To have specific info about the a pod you can run:

kubectl describe pod nginx

To get more info from a pod, per example the IP address:

kubectl get pod -o wide

Conclusion

Now you can operate/manage your pods on kubernetes and scale it.

svgKubernetes - Intro
svg
svgClean Code - Comments

Leave a reply