Udemy CKA 강의 정리 59: Solution - Taints and Tolerations (Optional)
해당 내용은 Udemy의 Certified Kubernetes Administrator (CKA) with Practice Tests 강의를 공부한 내용입니다. 내용을 그대로 번역하기보다는, 제가 이해하기 쉬운 대로 수정한 부분들이 있습니다.
⚠️ 영어 독해가 많이 부족합니다. 틀린 내용이 있으면 알려주시면 감사하겠습니다.
Q1. How many nodes
exist on the system?

답: 2
Q2. Do any taints exist on node01
node?
kubectl describe node node01
로 자세히 봅니다.

(NoSchedule이라고 나오는데.. 답은 No 라고 한다. 왜지?)
답: No
Q3. Create a taint on node01
with key of spray
, value of mortein
and effect of NoSchedule
kubectl taint --help
의 도움을 받아, 아래와 같은 커맨드 실행!

Q4. Create a new pod with the nginx
image and pod name as mosquito.

Q5. What is the state of the POD?

답: Pending
Q6. Why do you think the pod is in a pending state?
kubectl describe pod mosquito
로 살펴봅시다.

답: POD Mosquito cannot tolerate tan Mortein
Q7. Create another pod named bee
with the nginx
image, which has a toleration set to the taint mortein
.
bee.yaml파일을 만듭니다.

tolerations 필드를 추가해줍니다.

bee파드를 만듭니다.

Q8. Notice the bee
pod was scheduled on node node01
despite the taint.
Q9. Do you see any taints on controlplane
node?

답: Yes, NoSchedule
Q10. Remove the taint on controlplane
, which currently has the taint effect of NoSchedule
.

Q11. What is the state of the pod mosquito
now?

답: Running
Q12. Which node is the POD mosquito
on now?

답: controlplane