Day-3 | Node Selector, Node Affinity, Taints and Tolerations | Kubernetes Zero to Hero

  Рет қаралды 9,331

Abhishek.Veeramalla

Abhishek.Veeramalla

17 күн бұрын

Support my work
www.buymeacoffee.com/abhishekprd
In Kubernetes, the scheduler is responsible for assigning pods to nodes in the cluster based on various criteria. Sometimes, you might encounter situations where pods are not being scheduled as expected. This can happen due to factors such as node constraints, pod requirements, or cluster configurations.
1. Node Selector
Node Selector is a simple way to constrain pods to nodes with specific labels. It allows you to specify a set of key-value pairs that must match the node's labels for a pod to be scheduled on that node.
Usage: Include a nodeSelector field in the pod's YAML definition to specify the required labels.
2. Node Affinity
Node Affinity is a more expressive way to specify rules about the placement of pods relative to nodes' labels. It allows you to specify rules that apply only if certain conditions are met.
Usage: Define nodeAffinity rules in the pod's YAML definition, specifying required and preferred node selectors.
3. Taints
Taints are applied to nodes to repel certain pods. They allow nodes to refuse pods unless the pods have a matching toleration.
Usage: Use kubectl taint command to apply taints to nodes. Include tolerations field in the pod's YAML definition to tolerate specific taints.
4. Tolerations
Tolerations are applied to pods and allow them to schedule onto nodes with matching taints. They override the effect of taints.
Usage: Include tolerations field in the pod's YAML definition to specify which taints the pod tolerates.
GitHub Repo
github.com/iam-veeramalla/kub...
Here are some more very useful Zero to Hero playlists on the channel.
- Free DevOps Playlist: • DEVOPS ZERO TO HERO CO...
- AWS Zero to Hero Playlist: • AWS Zero to Hero - AWS...
- Terraform Zero to Hero Playlist: • Terraform Zero to Hero
- Python for DevOps Playlist: • Python for DevOps
Have any questions while learning ? Don't worry, Join our Doubts Clearing Group.
Join our Doubts Clearing Group
/ @abhishekveeramalla
About me:
========
Instagram: / abhishekveeramalla_off...
Telegram Channel : t.me/abhishekveeramalla
LinkedIn: / abhishek-veeramalla
GitHub: github.com/iam-veeramalla
Medium: / abhishekveeramalla-av

Пікірлер: 83
@sagarmisra6932
@sagarmisra6932 17 күн бұрын
Thanks Abhishek for listening to each and every subscriber, I requested it and here u go, I got it, can't thank u enough❤❤
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
My pleasure 😊
@subhashmannem
@subhashmannem 16 күн бұрын
In interviews they are asking what you did recently in kubernets. Could please suggest me how to say
@sohamkasar7218
@sohamkasar7218 15 күн бұрын
​U can ​say u r day to day activities on Kubernetes to him @@subhashmannem
@Muchu1980
@Muchu1980 11 күн бұрын
Hi Abhi- You have demonistarated the most complicated concepts in simple and easy with examples in shot time. Thank you so much and It makes our basics very strong!!
@AbhishekVeeramalla
@AbhishekVeeramalla 11 күн бұрын
❤️
@soumyadipchatterjee2267
@soumyadipchatterjee2267 8 күн бұрын
Since I started learning & implementing Kubernetes , always had some challenging to understand Taint & tolerations , Node Affinity ,Node selector . But again the Big brother of DevOps community simplified with hands-on and I also practice with him to understand the concepts .😊😊❤❤
@AbhishekVeeramalla
@AbhishekVeeramalla 7 күн бұрын
❤️❤️❤️
@abhinaygunjal1114
@abhinaygunjal1114 11 күн бұрын
I wanted to get through Node concepts like selectors, affinity and taints. But couldn't understand it thoroughly anywhere until i stumbled upon this video! Thank you Abhishek!👍
@AbhishekVeeramalla
@AbhishekVeeramalla 11 күн бұрын
Glad I could help!
@sarthakmajhi6586
@sarthakmajhi6586 16 күн бұрын
These videos are great, I've just started with k8s and your videos help a lot. Kudos!! 🎉
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
Glad you like them!
@issaquemohammed5539
@issaquemohammed5539 13 күн бұрын
Great Explanation. Thank you so much.
@AbhishekVeeramalla
@AbhishekVeeramalla 12 күн бұрын
You are welcome!
@Cloudnp9458
@Cloudnp9458 6 күн бұрын
Nodeselector is a hard match. Nodeaffinity - you have two options preffered and required. Preffered during scheduling and ignored during execution and required during scheduling and ignored during execution.
@Cloudnp9458
@Cloudnp9458 6 күн бұрын
Nodeselector is a hard match. Nodeaffinity - you have two options preffered and required. Preffered (soft rule, try to find node with label but if not schedule on other nodes) during scheduling and ignored during execution and required (hard rule for) during scheduling and ignored during execution.
@thanvikamadhala-ip7kg
@thanvikamadhala-ip7kg 14 күн бұрын
Great Explanation. ThankYou.
@AbhishekVeeramalla
@AbhishekVeeramalla 14 күн бұрын
You are welcome!
@stephenogwu-fl7cw
@stephenogwu-fl7cw 14 күн бұрын
Thanks Abhishek. Glad we can complete the troubleshooting on kubernetes
@AbhishekVeeramalla
@AbhishekVeeramalla 14 күн бұрын
Glad to hear that
@user-jy7rm1sy3j
@user-jy7rm1sy3j 14 күн бұрын
@AbhishelVeeramalla Best Video ever I have seen about Taint and Tolerations.
@AbhishekVeeramalla
@AbhishekVeeramalla 14 күн бұрын
Thanks 🙏
@Cloudnp9458
@Cloudnp9458 6 күн бұрын
Nodeselector helps devops engineer implement how a particular pod can be ran on certain node, with amd or arm processor. Step 1. You will add label to node. Step 2. You willl add nodeselector on pod.
@kasutubhpatil6352
@kasutubhpatil6352 12 күн бұрын
Thanks Abhishek you have explained this complicated concept in a very simple way
@AbhishekVeeramalla
@AbhishekVeeramalla 11 күн бұрын
Glad to hear that
@vs9108
@vs9108 16 күн бұрын
Thanks Abhishek always looking forward to your easy to understand videos ! :)
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
My pleasure 😊
@Cloudnp9458
@Cloudnp9458 6 күн бұрын
If you have a node that is set to unscheduleable for upgrading purpose. You drain the node and make that node unscheduleable, cordon. Taint - > set on node , that will repell every pod that doesn't have toleration to the taint. Types of nodeaffinity 1. Noschedule - no scheduling 2. No execute - dangerous as all existing pod will stop working that don't tolerate taint 3. Preferred no schedule - performance of node is declined, performance issues, in the worst case schedule on this node, otherwise go for other nodes. kubectl taint nodes key=value: Noschedule kubectl taint nodes multi-worker key1=value:Noschedule
@user-gk3xr7kq8u
@user-gk3xr7kq8u 15 күн бұрын
Hi bro, am listening each and every aws devops content from ur videos, its getting more knowledge to me. very understandable, and this content is so useful to us. am preparing from ur vedios only... thanks is a small thing for u... who are not efforted money to get the cources, ur content will help to them anna. great help ur doing.
@AbhishekVeeramalla
@AbhishekVeeramalla 15 күн бұрын
❤️
@shaktiprasadmishra5239
@shaktiprasadmishra5239 13 күн бұрын
Thank you Abhishek.This one is nice.lets create a video for a 3 tier architecture how to find root cause of multiple pods crashing and services are not assign IP address by going deep dive inside logs and events of each pod.
@AbhishekVeeramalla
@AbhishekVeeramalla 13 күн бұрын
Welcome 🙏
@ashishpandey8766
@ashishpandey8766 14 күн бұрын
Thank you so much abhi...🙏
@AbhishekVeeramalla
@AbhishekVeeramalla 14 күн бұрын
Always welcome
@chandrasekhar7147
@chandrasekhar7147 14 күн бұрын
Thank you so much for great videos in kubernetes troubleshooting issues
@AbhishekVeeramalla
@AbhishekVeeramalla 14 күн бұрын
You are most welcome
@bhasurukowshik886
@bhasurukowshik886 16 күн бұрын
Hi #Abhishek anna, Thanks is a small word for your continuous efforts in making and breaking the complexity of the concepts, We are blessed to have you here in the KZbin, Thank you so much for your efforts,. One request from our end, Please upload the videos a little earlier as we are in the phase of interview season where a thump of openings are present in the market and it would be grateful if you do this favor for us. And yes we know this takes a lot of pure hard work and don't worry as a Thanksgiving we assure you for the Growth of the channel.
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
Hi 👋, Sure. Due to some personal issues I could not upload the videos of this series continuously. I am trying my best
@tariqrais2523
@tariqrais2523 13 күн бұрын
Very helpful.
@AbhishekVeeramalla
@AbhishekVeeramalla 12 күн бұрын
Glad it was helpful!
@sreenivasulureddyperam1589
@sreenivasulureddyperam1589 15 күн бұрын
It's Great great great great explanation..
@AbhishekVeeramalla
@AbhishekVeeramalla 15 күн бұрын
❤️
@Cloudnp9458
@Cloudnp9458 6 күн бұрын
Toleration is exception given to certain pod to run on tainted nodes. High priority production critical pod that should definitely run, these pod can still run on tainted nodes toleration has mention of taint key value and taint effect inside pod manifest fole
@Pachu457
@Pachu457 12 күн бұрын
Subscribed to your channel. You are an awesome guy
@AbhishekVeeramalla
@AbhishekVeeramalla 12 күн бұрын
Thanks for the sub!
@atulghodmare
@atulghodmare 16 күн бұрын
Great explanation thank you so much...please make videos on vault cluster from scratch as production grade, you have created one but it is very basic...i request you to please create deep dive lectures on vault
@AbhishekVeeramalla
@AbhishekVeeramalla 15 күн бұрын
Noted
@Cloudnp9458
@Cloudnp9458 6 күн бұрын
What is diff btw nodeselector vs nodeaffinity. Although features are similar. But nodeaffinity gives more of a granular level of flexibility to schedule pods on certain nodes. With nodeselector being hard match. Similarly requiredDSIDE is hard rule , but PrefferedDSIDE is soft rule, if it fails to find node with certain label, it will either way schedule pods on other nodes as well.
@kodandapuramramu2457
@kodandapuramramu2457 14 күн бұрын
Hi Abhishek Bro, Thank you very much for this wonderful content. I have one question here; Using Deamonset as well we can schedule POD on specific node, then what is the main difference between using Deamonset Nodeselector, Deployment Nodeselector?
@ramlakshmi213
@ramlakshmi213 16 күн бұрын
Thanks Abhishek, do you have any plans to do GCP Zero to Hero series ?
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
Not now
@user-ys4jy8bd6c
@user-ys4jy8bd6c 14 күн бұрын
there are so much confusion about APACHE TOMCAT & NGINX .....how they takes place in real time projects because when ever watched a real time project video..there is no topic popsup on both....i request you to address this in any future video....
@AbdulRehman-bi1dv
@AbdulRehman-bi1dv 15 күн бұрын
This is awsome Abhishek but we can also face an issue while creating a pod in a pending state if our one of the control plane's component that is kube-scheduler pod is not running as we know that the job of the kube-scheduler is to schedule the pod so again if this static pod (kube-scheduler) is not running fine we can also face this issue correct me if i am saying something wrong.
@senthilkumar5129
@senthilkumar5129 16 күн бұрын
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
❤️
@user-fr6yo4kg9c
@user-fr6yo4kg9c 11 күн бұрын
Thank you Abhishek for the wonderful videos, could you please explain the difference between taint Vs cordon use cases if possible.
@gajulaprasanna648
@gajulaprasanna648 15 күн бұрын
Hi Abhishek, thank you so much for your videos. I learned alot from videos. Please make videos on Ansibles also. It's my request
@tanayabanerjee2380
@tanayabanerjee2380 15 күн бұрын
Hi, thanks for the great video❤..one request if possible please also try to add the ssl certificates concept and how it works with k8s ..
@AbhishekVeeramalla
@AbhishekVeeramalla 14 күн бұрын
Thanks 🙏
@PrasanthiGorantla
@PrasanthiGorantla 16 күн бұрын
Can you please explain the differences between node affinity and taints and tolerations
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
Watch the complete video
@sairam-bl6bx
@sairam-bl6bx 16 күн бұрын
Hi How to improve communication bro... Please suggest me
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
Keep talking thats it
@fritzdamiendengambog9169
@fritzdamiendengambog9169 15 күн бұрын
Tanks boss
@isaacambi1914
@isaacambi1914 14 күн бұрын
Wow, this guy is the Lionel Messi of DevOps engineers
@AbhishekVeeramalla
@AbhishekVeeramalla 14 күн бұрын
Haha , Thanks 🙏
@chandrasekhar7147
@chandrasekhar7147 14 күн бұрын
I have one doubt on node affinity, is there any default value for node affinity, if it is there what is the value
@Cloudnp9458
@Cloudnp9458 6 күн бұрын
FailedScheduling error in describing pod. None of the node is available for scheduling. Because pod had field of nodeselector. Schedule the pod only on particular node with certain label. Pod. If there's no node with that label. Pod will be unscheduleable. Requirement, pod that has application that will only run on node with ARM processor. So u can schedule the pod on node with label processor: ARM
@debashismca
@debashismca 16 күн бұрын
Hi Abhishek, i got few chances to join with your LIVE session but i asked few questions but may be you did not notice my question. First question is -Interviwer asking "What Best practice you have implemented for CICD". I Explained in my way but not sure i feel like they are partially convienced. Pls help me
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
Yeah you explain about the security best practices that you have taken or gitops best practices e.t.c.,.
@BharathKumarReddy2103
@BharathKumarReddy2103 16 күн бұрын
❤❤❤
@AbhishekVeeramalla
@AbhishekVeeramalla 15 күн бұрын
❤️
@sravandatha9511
@sravandatha9511 13 күн бұрын
Hi Abhishek, Thank you for this video. Can you make the next video on the K8s issue where pods cannot schedule in 0/3 nodes due to memory or CPU issue.
@AbhishekVeeramalla
@AbhishekVeeramalla 13 күн бұрын
It does not need a video. As the error clearly explains there are no nodes available with enough cpu or ram to run your pods.
@nehaawasthi6026
@nehaawasthi6026 4 күн бұрын
Hello abhishek, thanks for making me a good devops engineer, I need help also can you create a video on how we can use terraform and ansible together I.e terrible (I want to use output.tf as ansible inventory in ansible to pick dynamic hostnames or ip's), if it world be in azure devops using pipeline that will be really helpful.
@user-hu5bv9pv3r
@user-hu5bv9pv3r 16 күн бұрын
Hi Anna i’m Regular following your playlists can you please make a videos on total Ansible zero - Hero series.
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
Sure
@sadit--world
@sadit--world 16 күн бұрын
Could you please publish CKS course with deep drive?
@AbhishekVeeramalla
@AbhishekVeeramalla 15 күн бұрын
Thanks
@bhargav6322
@bhargav6322 16 күн бұрын
Bro nodeport is not working pls give me any suggestions plss😢
@AbhishekVeeramalla
@AbhishekVeeramalla 16 күн бұрын
NodePort will work may be your node is not accessible from outside
@ramesh_kumar_verma
@ramesh_kumar_verma 9 күн бұрын
Th@nkyou $!r
@Cloudnp9458
@Cloudnp9458 6 күн бұрын
Kubectl edit node Medata.labels- node-name: arm
Kajian Kitab RIYADHUSH SHALIHIN Bersama Ust. M Latief Utsman Sabtu 6 Januari 2024
46:33
Masjid Mujahidin Malang Candi Mendut
Рет қаралды 16
Balloon Pop Racing Is INTENSE!!!
01:00
A4
Рет қаралды 16 МЛН
How to open a can? 🤪 lifehack
00:25
Mr.Clabik - Friends
Рет қаралды 14 МЛН
😱СНЯЛ СУПЕР КОТА НА КАМЕРУ⁉
00:37
OMG DEN
Рет қаралды 1,8 МЛН
Advanced Scheduling in Kubernetes
24:57
Pavan Elthepu
Рет қаралды 13 М.
Balloon Pop Racing Is INTENSE!!!
01:00
A4
Рет қаралды 16 МЛН