Kubernetes Hard and Soft Node Affinity

preview_player
Показать описание
#shorts
Kubernetes interview questions | DevOps interview questions | SRE interview questions answer
Type of is node affinity in kubernetes?
What is node affinity in kubernetes?

-----
Node Affinity and Node Selector both helps you to specify which pods should be scheduled to which-nodes.

The nodeSelector field of the pod template contains a node selector definition.
The target node can have specific node labels. Only nodes with all of the labels you specify are selected by Kubernetes to schedule the pod.

Node affinity gives users more precise control over pod placement by combining logical operators with both soft and hard scheduling concepts.
(The scheduler may still schedule a Pod onto a particular node even if the soft rule is not satisfied.)

A pod's node affinity specifies the conditions under which it should be scheduled to a node. There are two types of node affinity that you can specify in the pod template under spec:

Hard affinity
DuringSchedulingIgnoredDuringExecution. This outlines the requirements that a node must fulfil in order for a pod to schedule to it.

Soft affinity
preferredDuringSchedulingIgnoredDuringExecution. This specifies conditions that a node should ideally meet, but if they are not present, the pod can still be scheduled.
When a node's affinity rules change at runtime and are no longer met, the "IgnoredDuringExecution" portion of the condition let the pod to continue running.

---------

main components of control plane
kubernetes nodes, there are two types of nodes worker nodes and master node/ control plane.
Master node is used as synonym for nodes hosting the control plane

kube-apiserver
etcd
kube-scheduler
kube-controller-manager
cloud-controller-manager

shorts on kubernetes

Devops Tech Park, Devops techpark, devopstechpark , kubernetes, control plane

#devopstechpark #devops #kubernetes #eks #tutorial #k8s #interview #sre #affinity #nodeselector #node

DevOps TechPark tricks and tutorials for DevOPs and SREs
Рекомендации по теме