Kubernetes - Taints & Tolerations

choko's avatar
Jun 29, 2024
Kubernetes - Taints & Tolerations
 
 

Taint

  • 노드에 taint를 설정하여 임의의 Pod가 할당되는것을 방지한다.
kubectl taint nodes --all node-role.kubernetes.io/master-
  • kubectl taint node {nodename} {key}={value}:{option}
    • 다음과 같이 특정 노드의 key-value 형식으로 taint가 등록됨
  • kubectl describe node 의 taint 탭에서 노드 taint 설정을 확인할 수 있다.
 

Toleration

  • pod 에 tolertaion을 설정하여 taint 상태인 pod가 해당 pod를 할당 가능하게 한다.
... in calico ... tolerations: # Make sure calico-node gets scheduled on all nodes. - effect: NoSchedule operator: Exists
 
Share article

Tom의 TIL 정리방