โ Kubernetes taint & toleration
Udemy Labs - Certified Kubernetes Administrator with Practice Tests
Scheduling : Practice Test- Node Affinity
Taint๊ณผ์ ์ฐจ์ด์ ์?
Taint๋ Pod ๋ฐฐํฌ๋์ง ๋ชปํ๋๋ก ํ๋ ์ ์ฑ
Affinity๋ ํน์ Node์ Pod ๋ฐฐํฌ๋๋๋กํ๋ ์ ์ฑ
~~๊ทธ๋ผ ๋ ์ค์ ํ๋ ์ ์ฌ์ฉํ๋ฉด ๋์ง ์์๊น...???๋ผ๋ ์๊ฐ..~~
Node Selector๊ณผ์ ์ฐจ์ด์ ์?
Node Selector ๋ node์ label๊ณผ pod์ selector label์ด ๋งค์นญ๋๋ node์๋ง ๋ฐฐํฌ
Affinity์ ๊ฐ์ ๊ธฐ๋ฅ
node selector๊ฐ affinity๋ณด๋ค ์ฌ์ฉํ๊ธฐ ๊ฐ๋จํ ๋๋..
node selector ๊ฐ์ ๊ฒฝ์ฐ๋ requiredDuringSchedulingIgnoredDuringExecution ์ ๋์ผํ๊ฒ ๋์
๊ท์น์ด ๋ง์กฑ๋์ง ์์ผ๋ฉด ์ ๋ ๋ค๋ฒ ์ค์ผ์ค๋ง ๋์ง ์์.. ๊ทธ๋์ hard ๋ผ๊ณ ํํํ๋ ๋ฏ
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: [key name]
operator: [??]
values:
- [value name]
containers:
- name: nginx
image: nigix
In : values[] ํ๋์ ์ค์ ํ ๊ฐ ์ค ๋ ์ด๋ธ์ ์๋ ๊ฐ๊ณผ ์ผ์นํ๋ ๊ฒ์ด ํ๋๋ผ๋ ์๋์ง
Exists : key ํ๋์ ์ค์ ํ ๊ฐ์ด ๋ ์ด๋ธ์ ์๋์ง๋ง
์ฐธ๊ณ
https://kubernetes.io/ko/docs/concepts/scheduling-eviction/assign-pod-node/
https://bcho.tistory.com/1346