DEV Community

Understanding Kubernetes: part 1 – Pods

Aurélie Vache on April 24, 2020

Understanding Kubernetes can be difficult or time-consuming. In order to spread knowledges about Cloud technologies I started to create sketchnotes...
Collapse
 
abdellani profile image
Mohamed ABDELLANI

Hi @aurelievache

Thank you for sharing.

I started working on kubernetes recently, and I'm using GKE in autopilot mode.

I noticed that when I tried to use the pods (several hundred) (using jobs) to run some algorithms that require several minutes (>15 min), K8S was selecting pods randomly and kill them.

To solve the issue, I was able to change the data chunk size to make the each tasks faster (less than 2 min).

Now, I'm wandering: Are the PODS, and kubernets in general, a good tool for running long-time processing algorithms ?

Thank you again.

Kind regards.

Collapse
 
aurelievache profile image
Aurélie Vache

Hi and thank Mohamed
Pods are mortal by design, ther are not supposed to live forever :-)
For your need, you can use Jobs, as you already used it.
Have you defined a good activeDeadlineSeconds parameter in jobs spec?

"The activeDeadlineSeconds applies to the duration of the job, no matter how many Pods are created. Once a Job reaches activeDeadlineSeconds, all of its running Pods are terminated and the Job status will become type: Failed with reason: DeadlineExceeded."
So you can increate it for your needs for example, and also run several pods in parallel in order to parallelize your job

Collapse
 
abdellani profile image
Mohamed ABDELLANI

Thank you @aurelievache

Does this mean that I should never deploy a queuing system like rabbitmq as a pod?

In my case, the queuing system is very active in the application. All other pods rely on it. if the queuing system pod fails, I'll need to waste time before I can resume the process.

Collapse
 
chloeveux profile image
chloeveux

Salut, Aurélie! Il est toujours utile d'expliquer les concepts fondamentaux. Une bonne documentation permet d'éviter les nuits blanches.) Je connais Docker. Et je délègue la configuration cloud à DevOps.

Pourrais-tu m'aider s'il te plaît. J'ai besoin d'un examen de mon #showdev sur dev.to. Merci)

Collapse
 
aurelievache profile image
Aurélie Vache

Bonjour Chloé,
Je n'ai pas trop compris.
De quelle aide a tu besoin ? 😉

Collapse
 
chloeveux profile image
chloeveux

Aurélie, j'aime le développement de produits. Y a-t-il des idées intéressantes sur les kubernetes? Je veux dire que cela pourrait être cool pour les autres, et c'est facile à faire.

Collapse
 
chloeveux profile image
chloeveux

Je suis désolé. On dirait qu'il est considéré comme du spam.

Collapse
 
aurelievache profile image
Aurélie Vache

Yes, I imagine pods like pokeballs which can contenate one or several containers 🙂.

Happy you like the kube sketchnotes serie.

The difference between Dev and production can be the scaling auto with hpa, but also the multi region, the security, the network policies... Many things to talk if you are interested🙂

Collapse
 
abhishekamralkar profile image
Abhishek Anand Amralkar

I really like the way K8s explained via sketch notes. Great job. May I know if the sketch are drew from hand or any software is used? If software may I know the name?

Thanks

Collapse
 
aurelievache profile image
Aurélie Vache

thanks :)
sketchnotes are drawn by hand with a samsung pencil :)

Collapse
 
abhishekamralkar profile image
Abhishek Anand Amralkar

Wow! That's Amazing. Thanks for the update.

Collapse
 
prateek248 profile image
prateek248

Nice

Collapse
 
vinayhegde1990 profile image
Vinay Hegde

This is brilliantly drawn, Aurelie! Could you please publish a similar series for Webservers (Nginx, HAProxy, Traefik etc..)

Collapse
 
aurelievache profile image
Aurélie Vache

Thanks 😊
I will publish a serie about Istio, soon, and then maybe Traefik, I am thinking of futures series 🙂

I note for HaProxy and Nginx too.

Collapse
 
vinayhegde1990 profile image
Vinay Hegde

I've recently started working with Istio so I'm looking forward to your sketchnotes on it 😄

Collapse
 
sirseanofloxley profile image
Sean Allin Newell

This is awesome! Special request for PVCs (including storage class, volume, volume mount) and for Ingress.

Collapse
 
aurelievache profile image
Aurélie Vache

Thanks for your kind words :-).
I've created 10 sketchnotes yet, I will publish them shortly and started yesterday a sketch about storageclass, pv and pvc :-).
I note for Ingress :-).

Collapse
 
dvpschamp profile image
dvpschamp

Thanks for this amazing work and making it available.

Collapse
 
ojacques profile image
Olivier Jacques

Très cool Aurelie. La série est excellente. Merci.

Collapse
 
aurelievache profile image
Aurélie Vache

Merci 🙂
J'espère que la suite te plairas autant 😉

Collapse
 
sunflower profile image
sunflowerseed

I am amused by your runnab "to the power L" e. 😊😊😊

Collapse
 
jgorusu profile image
Jany Gorusu

once i pay money how do i receive pdf of sketchnote?

Collapse
 
aurelievache profile image
Aurélie Vache

Hi, when you buy the ebook on gumroad you can access to it through the platform. Do you have an issue?
You can contact them in case of troubles.