Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- AWS Opensearch
- iam
- AWS Elasticsearch
- 보안기사
- ISMS-P 인증심사원
- CFReDS
- kubernetes
- EKS
- AWS 쿠버네티스
- k8s
- 해킹
- ISMS
- hacking case
- 정보보안기사 실기
- 모의해킹
- 포렌식
- The Sleuth Kit
- isms-p
- Autopsy
- 정보보안
- AWS EKS Udemy
- 쿠버네티스
- 정보보안기사
- artifacts
- TSK
- AWS
- AWS EKS
- 보안
- forensic
- 실습
Archives
- Today
- Total
Always-Try(정보보안 및 일상)
[CKA 준비] 섹션 3: Scheduling - Taints and Tolerations, Node Affinity 관련 본문
Kubernetes (Kubernetes security)
[CKA 준비] 섹션 3: Scheduling - Taints and Tolerations, Node Affinity 관련
Always-Try 2026. 5. 3. 21:53Q1. [Toleration] 특정 노드에 설정된 Taint 때문에 포드가 안 떠요. 어떻게 하죠?
A: 노드에 설정된 Taint(얼룩)를 견딜 수 있도록 포드 설정에 Toleration(내성)을 추가해야 합니다.
- 해결법: 포드 YAML의 spec 섹션에 tolerations 필드를 작성합니다.
- 핵심 문법:
-
YAML
tolerations: - key: "spray" operator: "Equal" value: "mortein" effect: "NoSchedule"
Q2. [Taint 제거] 노드에 걸린 제약(Taint)을 아예 없애고 싶을 땐?
A: kubectl taint 명령어 끝에 마이너스(-) 기호를 붙여 실행하면 즉시 제거됩니다.
- 실행 예시:
-
Bash
# 먼저 describe로 정확한 키와 이펙트 확인 kubectl describe node controlplane | grep Taints # 제거 실행 kubectl taint nodes controlplane node-role.kubernetes.io/control-plane:NoSchedule-
Q3. [Label] Node Affinity를 쓰기 위해 노드에 이름표를 붙이려면?
A: kubectl label 명령어를 사용해 노드에 키-값 쌍의 Label을 부여해야 합니다.
- 실행 예시:
-
Bash
# node01에 color=blue 레이블 추가 kubectl label node node01 color=blue # 확인 kubectl get nodes --show-labels
Q4. [Node Affinity] 특정 레이블이 있는 노드에만 포드를 띄우는 법은?
A: 포드나 Deployment의 spec에 Node Affinity 설정을 추가합니다. 가장 강력한 강제성은 requiredDuringScheduling...을 사용합니다.
- 핵심 문법:
-
YAML
affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: color operator: In values: - blue
Q5. [Efficiency] YAML 파일을 처음부터 다 타이핑해야 하나요?
A: 아니요! dry-run 기능을 사용하여 기본 뼈대를 만들고 필요한 부분만 수정하는 것이 가장 효율적입니다.
- 꿀팁 명령어:
-
Bash
# Deployment 뼈대 만들기 kubectl create deployment red --image=nginx --replicas=2 --dry-run=client -o yaml > red.yaml - 그 다음 vi red.yaml로 들어가서 Affinity나 Toleration 부분만 공식 문서를 참고해 붙여넣으세요.
'Kubernetes (Kubernetes security)' 카테고리의 다른 글
| [CKA 준비] 섹션 3: Scheduling - Manual Scheduling, Labels and Selectors 관련 (0) | 2026.05.03 |
|---|---|
| [CKA 준비] 섹션 2: Core Concepts Labs 진행 간 Q&A (0) | 2026.05.03 |
| Kubestronaut 도전: 실무자라는 핑계로 놓쳤던 개념들 (0) | 2026.05.02 |
Comments