콘텐츠로 이동

드라이버 자동 업그레이드하기

NPU Operator가 드라이버를 자동으로 업그레이드하도록 설정합니다.

이 튜토리얼은 제품군별 드라이버 구성을 기준으로 합니다. Operator가 아직 설치되어 있지 않다면 먼저 NPU Operator 설치 절차를 진행합니다.

Helm으로 설치한 Operator가 RBLNDriver 인스턴스를 관리하는 상태에서 시작합니다.

1. 현재 버전 확인하기

이 튜토리얼은 atom과 rebel100 RBLNDriver 인스턴스를 사용합니다. 설치 환경의 인스턴스 이름이 다르면 그 이름으로 바꿔 사용하면 됩니다. Ready 노드 수를 확인합니다.

$ kubectl get rblndriver \
  -o 'custom-columns=NAME:.metadata.name,VERSION:.spec.version,READY:.status.readyNodes,DESIRED:.status.desiredNodes'
NAME                   VERSION   READY   DESIRED
rbln-driver-atom       3.4.0     1       1
rbln-driver-rebel100   3.5.0     1       1

2. 목표 버전 지정하기

이 튜토리얼에서는 ATOM™을 3.4.0에서 3.4.1로, Rebel100™을 3.5.0에서 3.5.1로 업그레이드합니다. 현재 차트 버전을 유지하면서 자동 업그레이드를 활성화합니다.

업그레이드 중 노드 동작

Operator는 대상 노드를 cordon하고 업그레이드 정책에 따라 NPU 워크로드를 종료합니다. 드라이버를 교체하고 노드 검증을 마친 뒤 uncordon합니다.

CHART_VERSION=$(helm get metadata rbln-npu-operator -n rbln-system -o json | jq -r .version)
export ATOM_TARGET_VERSION=3.4.1
export REBEL100_TARGET_VERSION=3.5.1
helm upgrade rbln-npu-operator oci://docker.io/rebellions/rbln-npu-operator-chart \
  --version "$CHART_VERSION" -n rbln-system --reuse-values \
  --set driver.upgradePolicy.autoUpgrade=true \
  --set driver.upgradePolicy.maxParallelUpgrades=1 \
  --set-string driver.instances.atom.image.tag="$ATOM_TARGET_VERSION" \
  --set-string driver.instances.rebel100.image.tag="$REBEL100_TARGET_VERSION" \
  --wait --timeout 10m

3. 업그레이드 확인하기

교체된 드라이버 Pod가 Ready 상태가 된 뒤 인스턴스 버전과 준비 상태를 확인합니다.

$ kubectl get rblndriver \
  -o 'custom-columns=NAME:.metadata.name,VERSION:.spec.version,READY:.status.readyNodes,DESIRED:.status.desiredNodes'
NAME                   VERSION   READY   DESIRED
rbln-driver-atom       3.4.1     1       1
rbln-driver-rebel100   3.5.1     1       1

각 노드에 로드된 커널 모듈 버전을 조회합니다. 드라이버 Pod가 아직 교체 중이면 Ready 상태가 된 뒤 다시 실행합니다.

1
2
3
4
5
6
7
kubectl get pods -n rbln-system -l app.kubernetes.io/component=rbln-driver -o json | \
  jq -r '.items[] | [.metadata.name, .spec.nodeName] | @tsv' | \
  while IFS=$'\t' read -r pod node; do
    version=$(kubectl exec -n rbln-system "$pod" -c rbln-driver-container \
      -- cat /sys/module/rebellions/version) || exit 1
    printf '%s\t%s\n' "$node" "$version"
  done
출력 예시
node-atom   3.4.1
node-rebel100   3.5.1

ATOM™은 3.4.1, Rebel100™은 3.5.1로 표시되고 두 인스턴스가 ready 상태여야 합니다.

업그레이드 결과를 확인합니다.

$ kubectl get rblnclusterpolicy rbln-cluster-policy -o json | \
  jq '.status.driverUpgrade | {state, progress, failed}'
{
  "state": "Complete",
  "progress": "2/2",
  "failed": 0
}

노드가 cordon 상태로 남거나 업그레이드가 실패하면 워크로드를 재개하기 전에 자동 업그레이드 실패 원인과 복구 절차를 확인해야 합니다.