Update README: InfiniBand GPU 3-node config, simplify YAML examples

- Change node config to InfiniBand GPU 3 nodes
- Remove inline YAML blocks (templates already in configs/)
- Task 4 now references configs/volcano-trainjob-integration.yaml directly
- Add ibstat to prerequisite checks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
selee 2026-02-10 15:27:18 +09:00
parent dafa90e6d0
commit 6b413fe7d7
1 changed files with 26 additions and 152 deletions

178
README.md
View File

@ -8,7 +8,7 @@
|------|-----|
| Kubernetes | v1.34.3 |
| Helm | v4.0.4 |
| 노드 구성 | Master 3 + Worker 13 (총 16) |
| GPU 노드 | InfiniBand 연결 GPU 노드 3대 |
| Volcano | v1.14.0 |
| Kubeflow Trainer | sha-48e7a93 |
| JobSet (의존성) | v0.10.1 |
@ -40,6 +40,7 @@ kubeflow_trainer_with_volcano/
- Helm v3 이상
- `kubectl` 클러스터 접근 설정 완료
- GPU 노드에 NVIDIA device plugin 설치 완료
- InfiniBand 네트워크 구성 완료
- 클러스터에 기존 Volcano/Kubeflow CRD가 없는 상태
- 컨트롤 플레인 컴포넌트 배치용 노드에 `nodegroup: nd` 라벨 설정 완료
@ -50,6 +51,7 @@ helm version
kubectl get nodes
kubectl get nodes -l nodegroup=nd # 컨트롤 컴포넌트 배치 노드 확인
nvidia-smi # GPU 노드에서 확인
ibstat # InfiniBand 상태 확인
```
---
@ -66,8 +68,6 @@ kubectl create namespace volcano-system
### 2.2 Helm으로 Volcano 설치 (로컬 chart 사용)
모든 Volcano 컴포넌트는 `nodegroup: nd` 노드에 배치됩니다 (`configs/volcano-values.yaml`의 `default_ns` 설정).
```bash
helm install volcano charts/volcano/volcano-1.14.0.tgz \
-n volcano-system \
@ -86,19 +86,8 @@ helm install volcano charts/volcano/volcano-1.14.0.tgz \
# Pod 상태 확인 (모두 nodegroup=nd 노드에 배치되어야 함)
kubectl get pods -n volcano-system -o wide
# 기대 출력:
# volcano-admission-xxxxx 1/1 Running
# volcano-controllers-xxxxx 1/1 Running
# volcano-scheduler-xxxxx 1/1 Running
# CRD 확인
kubectl get crd | grep volcano
# 기대 출력:
# commands.bus.volcano.sh
# jobs.batch.volcano.sh
# podgroups.scheduling.volcano.sh
# queues.scheduling.volcano.sh
```
### 2.4 Volcano 삭제 (필요시)
@ -122,8 +111,6 @@ kubectl create namespace kubeflow-trainer
### 3.2 Helm으로 Kubeflow Trainer 설치 (로컬 chart 사용)
Trainer controller와 JobSet controller 모두 `nodegroup: nd` 노드에 배치됩니다 (`configs/kubeflow-trainer-values.yaml` 설정).
```bash
helm install kubeflow-trainer charts/kubeflow-trainer-0.0.0-sha-48e7a93.tgz \
-n kubeflow-trainer \
@ -145,28 +132,14 @@ kubectl apply -f manifests/kubeflow-trainer/runtimes/runtimes.yaml
### 3.4 설치 확인
```bash
# Trainer controller 확인 (nodegroup=nd 노드에 배치되어야 함)
# Trainer, JobSet controller 확인 (nodegroup=nd 노드에 배치되어야 함)
kubectl get pods -n kubeflow-trainer -o wide
# 기대 출력:
# kubeflow-trainer-controller-manager-xxxxx 1/1 Running
# jobset-controller-manager-xxxxx 1/1 Running
# CRD 확인
kubectl get crd | grep trainer
# 기대 출력:
# clustertrainingruntimes.trainer.kubeflow.org
# trainjobs.trainer.kubeflow.org
# trainingruntimes.trainer.kubeflow.org
# ClusterTrainingRuntime 확인
kubectl get clustertrainingruntimes
# 기대 출력:
# deepspeed-distributed
# torch-distributed
# ...
```
### 3.5 Kubeflow Trainer 삭제 (필요시)
@ -185,133 +158,42 @@ Volcano 스케줄러를 Kubeflow TrainJob과 연동하여 gang scheduling, queue
> Reference: https://www.kubeflow.org/docs/components/trainer/gang-scheduling/volcano/
### 4.1 Training Queue 생성
### 4.1 연동 설정 적용
Queue는 논리적인 리소스 풀입니다. 이 Queue에 속한 모든 TrainJob이 합산해서 사용할 수 있는 리소스 상한을 정합니다.
`capability`는 실제 클러스터 GPU/CPU/Memory 용량에 맞게 조정해야 합니다.
`configs/volcano-trainjob-integration.yaml`에 Queue, ClusterTrainingRuntime, 예시 TrainJob이 포함되어 있습니다.
```bash
kubectl apply -f - <<EOF
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
name: training-queue
spec:
weight: 1
reclaimable: true
capability:
# TODO: 실제 클러스터 용량에 맞게 조정
cpu: "100"
memory: "512Gi"
nvidia.com/gpu: "16"
EOF
```
Queue 상태 확인:
```bash
kubectl get queue training-queue -o yaml
```
### 4.2 Volcano 연동 ClusterTrainingRuntime 생성
`podGroupPolicy.volcano`를 사용하면 Volcano가 자동으로 PodGroup을 생성하고 gang scheduling을 적용합니다.
별도로 `schedulerName`이나 PodGroup 리소스를 수동 생성할 필요가 없습니다.
```bash
kubectl apply -f - <<EOF
apiVersion: trainer.kubeflow.org/v1alpha1
kind: ClusterTrainingRuntime
metadata:
name: torch-distributed-volcano
labels:
trainer.kubeflow.org/framework: torch
spec:
mlPolicy:
torch:
numProcPerNode: 1
numNodes: 1
# Volcano gang scheduling 활성화 - PodGroup 자동 생성
podGroupPolicy:
volcano:
networkTopology:
mode: hard
highestTierAllowed: 1
template:
metadata:
annotations:
# Queue 지정 (runtime level - 이 runtime을 사용하는 모든 TrainJob에 적용)
scheduling.volcano.sh/queue-name: training-queue
spec:
replicatedJobs:
- name: node
template:
spec:
template:
spec:
containers:
- name: node
image: ghcr.io/kubeflow/trainer/torch-runtime:latest
resources:
requests:
nvidia.com/gpu: "1"
limits:
nvidia.com/gpu: "1"
EOF
```
또는 전체 연동 설정 샘플 적용:
```bash
kubectl apply -f configs/volcano-trainjob-integration.yaml
```
### 4.3 연동 테스트
주요 구성 요소:
- **Queue** (`training-queue`): 학습 워크로드의 리소스 풀. `capability`를 실제 클러스터 용량에 맞게 조정 필요
- **ClusterTrainingRuntime** (`torch-distributed-volcano`): `podGroupPolicy.volcano`로 gang scheduling + topology-aware scheduling 자동 적용. PodGroup 수동 생성 불필요
- **Queue 지정**: runtime의 `spec.template.metadata.annotations`에서 설정. TrainJob level에서 override 가능:
```yaml
spec:
annotations:
scheduling.volcano.sh/queue-name: "other-queue"
```
Volcano 스케줄러를 사용하는 TrainJob 제출:
### 4.2 연동 확인
```bash
kubectl apply -f - <<EOF
apiVersion: trainer.kubeflow.org/v1alpha1
kind: TrainJob
metadata:
name: test-volcano-integration
namespace: default
spec:
runtimeRef:
name: torch-distributed-volcano
trainer:
image: ghcr.io/kubeflow/trainer/torch-runtime:latest
numNodes: 2
numProcPerNode: "1"
resourcesPerNode:
requests:
nvidia.com/gpu: "1"
limits:
nvidia.com/gpu: "1"
EOF
```
# Queue 확인
kubectl get queue training-queue
TrainJob level에서 Queue를 변경하고 싶으면 `spec.annotations`를 사용:
```yaml
spec:
annotations:
scheduling.volcano.sh/queue-name: "other-queue"
```
# ClusterTrainingRuntime 확인
kubectl get clustertrainingruntimes torch-distributed-volcano
### 4.4 연동 확인
# 테스트 TrainJob 상태 확인
kubectl get trainjob
```bash
# TrainJob 상태 확인
kubectl get trainjob test-volcano-integration
# PodGroup 자동 생성 확인 (podGroupPolicy에 의해 자동 생성됨)
# PodGroup 자동 생성 확인
kubectl get podgroup
# Pod 스케줄러 확인 (schedulerName이 volcano인지)
kubectl get pods -l trainer.kubeflow.org/trainjob-name=test-volcano-integration \
kubectl get pods -l trainer.kubeflow.org/trainjob-name=<trainjob-name> \
-o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.schedulerName}{"\n"}{end}'
# Volcano Queue 사용량 확인
kubectl get queue training-queue
```
---
@ -327,7 +209,7 @@ kubectl get queue training-queue
| Volcano scheduler | volcano-system | nodegroup: nd | X |
| Trainer controller | kubeflow-trainer | nodegroup: nd | X |
| JobSet controller | kubeflow-trainer | nodegroup: nd | X |
| TrainJob 학습 Pod | default (사용자 지정) | GPU 노드 | O |
| TrainJob 학습 Pod | default (사용자 지정) | GPU 노드 (InfiniBand) | O |
---
@ -351,9 +233,7 @@ kubectl get queue training-queue
**Volcano admission webhook 타임아웃**
```bash
# webhook 인증서 확인
kubectl get secret volcano-admission-secret -n volcano-system
# admission pod 로그 확인
kubectl logs -n volcano-system -l app=volcano-admission
```
@ -371,18 +251,14 @@ kubectl logs -n volcano-system -l app=volcano-scheduler
**TrainJob이 생성되지 않음**
```bash
# Trainer controller 로그 확인
kubectl logs -n kubeflow-trainer -l app.kubernetes.io/name=kubeflow-trainer
# TrainJob 이벤트 확인
kubectl describe trainjob <trainjob-name>
```
**ClusterTrainingRuntime을 찾을 수 없음**
```bash
# 런타임 목록 확인
kubectl get clustertrainingruntimes
# 런타임이 없으면 재설치
kubectl apply -f manifests/kubeflow-trainer/runtimes/runtimes.yaml
kubectl apply -f manifests/kubeflow-trainer/runtimes/runtimes.yaml # 재설치
```
### 연동 관련
@ -390,7 +266,6 @@ kubectl apply -f manifests/kubeflow-trainer/runtimes/runtimes.yaml
**PodGroup이 자동 생성되지 않음**
- ClusterTrainingRuntime에 `podGroupPolicy.volcano: {}` 가 설정되어 있는지 확인
- TrainJob이 올바른 runtimeRef(`torch-distributed-volcano`)를 참조하는지 확인
- Trainer controller 로그 확인
**TrainJob Pod가 default-scheduler로 스케줄링됨**
- `podGroupPolicy.volcano`가 runtime에 설정되어 있는지 확인
@ -399,7 +274,6 @@ kubectl apply -f manifests/kubeflow-trainer/runtimes/runtimes.yaml
### 로그 수집
```bash
# 전체 로그 수집
kubectl logs -n volcano-system -l app=volcano-scheduler --tail=100
kubectl logs -n volcano-system -l app=volcano-controller --tail=100
kubectl logs -n volcano-system -l app=volcano-admission --tail=100