YAML
-
Affinity : Pod를 원하는 Node에 띄우기Kubernetes 2023. 7. 22. 16:04
Affinity란 선호도란 뜻으로, Pod를 선호하는 Node에서 띄울 수 있게 하는 옵션이다. Affinity 종류 개요 nodeAffinity Pod를 배치할 때, 어떤 Node에 스케쥴링 할지 설정 한다. podAffinity Pod를 배치할 때, 실행 중인 Pod들 중에 선호하는 Pod를 찾아 해당 Pod와 동일한 Node로 배치하도록 설정한다. podAntiAffinity 실행 중인 Pod등 중에, 선호하지 않는 Pod가 실행중인 Node를 피해서 배치하도록 설정한다. nodeAffinity 옵션 **required**DuringScheduling**Ignored**DuringExecution 반드시 충족해야 하는 조건 (Hard) Label이 매칭 되는 Node에만 Pod 배포 가능 **pre..