Kubernetes Node Affinity Taints & Toleration Explained with Example for Beginners

preview_player
Показать описание
Kubernetes is platform to manage the scheduling of pods on given nodes hence it is important to understand what is node affinity, taints and toleration. Node affinity is a property of Pods that attracts them to a set of nodes. But Taints are the opposite. Node use taints to repel a set of pods.

Taint and toleration help in scheduling of pods to specific nodes. Taints are defined at node and Tolerations are applied to pods. Tolerations allow the scheduler to schedule pods with matching taints i.e., nodes. Taints and tolerations work together to ensure that pods are not scheduled onto inappropriate nodes. One or more taints are applied to a node and this marks that node should not accept any pods that do not tolerate the taints.

You add a taint to a node using kubectl taint command and the taint is key value pair with a type of effect. Setting taint on a node means no pod will be able to schedule onto node unless it has a matching toleration. Now you have to specify a toleration for a pod in the PodSpec. Scheduler will schedule pod with matching taint i.e., on matching node. A toleration matches a taint only if the keys are the same and the effects are the same.

You can define multiple taints on the same node and multiple tolerations on the same pod. Kubernetes processes multiple taints and tolerations like a filter. It starts with all the taints from a node, then ignore the pod with matching toleration. Now the remaining un-ignored taints will have the indicated effects on the pod e.g., no scheduling etc.

Kubernetes is a popular open-source platform for container orchestration. Kubernetes follows client-server architecture and Kubernetes cluster consists of one master node with set of worker nodes.
Multiple instances of an application can be running in different containers from various pods in different worker nodes. So, Kubernetes master node is used to manage these pods and container. So here is the hierarchy. A worker node can have multiple pods, a pod can run multiple containers and ideally one container run one instance of your application.

Kubernetes enables developers to easily build containerized applications and services. Kubernetes also scale, schedule and monitor those containers. Kubernetes automates operational tasks of container management and includes built-in commands for deploying applications, rolling out changes, scaling up and down, monitoring applications, and more. Kubernetes makes it easier to manage your containerized applications.

To build an application you need to build a bunch of containers and then use Kubernetes to manage those containers. Kubernetes is a system that manages containers i.e., containerized applications where a container could be explained as a lightweight virtual machine.

Kubernetes is very useful to DevOps team. As it offers service discovery, load balancing within the cluster, automated rollouts and rollbacks, self-healing of failed containers, and configuration management.

Major advantages of Kubernetes are as follow
1. Kubernetes Automates Container orchestration
2. Automatic Scaling Up and Down.
3. Strong Open-Source Communities.
4. Cost Efficiencies and Savings.
5. Ability to Run Anywhere.
6. Multi-Cloud Possibilities.
7. Improve Developer Productivity.

#kubernetes #taints #tolerations

** CHECK OUT OUR OTHER VIDEOS **

** CHECK OUR PLAYLISTS **
CodeOneDigest Learning Shorts
Docker Containers Complete Tutorial


** ABOUT OUR CHANNEL **
CodeOneDigest is a youtube channel for the videos on programming language, cloud and docker container technology in English and Hindi languages.

Check out our channel here:
Don’t forget to subscribe!

** OUR WEBSITE **

** GET IN TOUCH **

FOLLOW US ON SOCIAL - LIKE, SHARE & SUBSCRIBE
Get updates or reach out to Get updates on our Social Media Profiles!
Рекомендации по теме
Комментарии
Автор

Hi, a new #video on #kubernetes #nodeaffinity #taints #tolerations is published on #codeonedigest #youtube channel. Learn kubernetes #affinity #taint #toleration #programming #coding with #codeonedigest

#kubernetestaints #kubernetestaintmasternode #kubernetestaintsvslabels #kubernetestaintremove #kubernetestainttypes #kubernetestaintmaster #kubernetesaffinity #kubernetesaffinityvstaint #kubernetesaffinityrules #kubernetesaffinitypod #kubernetesaffinitylabel #kubernetestolerations #kubernetestolerationsexample #kubernetestolerationsexists #kubernetestolerationtaint

codeonedigest
welcome to shbcf.ru