기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
AWS CLI를 통한 추론 연산자 설치 실패
개요: AWS CLI를 통해 추론 연산자를 설치하는 경우 종속성이 누락되어 추가 기능 설치가 실패할 수 있습니다. 이 섹션에서는 일반적인 CLI 설치 실패 시나리오와 해결 방법을 다룹니다.
CSI 드라이버 누락으로 인해 추론 추가 기능 설치 실패
문제: 필요한 CSI 드라이버 종속성이 EKS 클러스터에 설치되지 않았기 때문에 추론 연산자 추가 기능 생성이 실패합니다.
증상 및 진단:
오류 메시지:
추가 기능 생성 로그 또는 추론 연산자 로그에 다음 오류가 나타납니다.
S3 CSI driver not installed (missing CSIDriver s3.csi.aws.com). Please install the required CSI driver and see the troubleshooting guide for more information. FSx CSI driver not installed (missing CSIDriver fsx.csi.aws.com). Please install the required CSI driver and see the troubleshooting guide for more information.
진단 단계:
-
CSI 드라이버가 설치되어 있는지 확인합니다.
# Check for S3 CSI driver kubectl get csidriver s3.csi.aws.com kubectl get pods -n kube-system | grep mountpoint # Check for FSx CSI driver kubectl get csidriver fsx.csi.aws.com kubectl get pods -n kube-system | grep fsx -
EKS 추가 기능 상태 확인:
# List all add-ons aws eks list-addons --cluster-name $EKS_CLUSTER_NAME --region $REGION # Check specific CSI driver add-ons aws eks describe-addon --cluster-name $EKS_CLUSTER_NAME --addon-name aws-mountpoint-s3-csi-driver --region $REGION 2>/dev/null || echo "S3 CSI driver not installed" aws eks describe-addon --cluster-name $EKS_CLUSTER_NAME --addon-name aws-fsx-csi-driver --region $REGION 2>/dev/null || echo "FSx CSI driver not installed" -
추론 연산자 추가 기능 상태 확인:
aws eks describe-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION \ --query "addon.{Status:status,Health:health,Issues:issues}" \ --output json
해결 방법:
1단계: 누락된 S3 CSI 드라이버 설치
-
S3 CSI 드라이버에 대한 IAM 역할 생성(아직 생성되지 않은 경우):
# Set up service account role ARN (from installation steps) export S3_CSI_ROLE_ARN=$(aws iam get-role --role-name $S3_CSI_ROLE_NAME --query 'Role.Arn' --output text 2>/dev/null || echo "Role not found") echo "S3 CSI Role ARN: $S3_CSI_ROLE_ARN" -
S3 CSI 드라이버 추가 기능 설치:
aws eks create-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name aws-mountpoint-s3-csi-driver \ --addon-version v1.14.1-eksbuild.1 \ --service-account-role-arn $S3_CSI_ROLE_ARN \ --region $REGION -
S3 CSI 드라이버 설치를 확인합니다.
# Wait for add-on to be active aws eks wait addon-active --cluster-name $EKS_CLUSTER_NAME --addon-name aws-mountpoint-s3-csi-driver --region $REGION # Verify CSI driver is available kubectl get csidriver s3.csi.aws.com kubectl get pods -n kube-system | grep mountpoint
2단계: 누락된 FSx CSI 드라이버 설치
-
FSx CSI 드라이버에 대한 IAM 역할 생성(아직 생성되지 않은 경우):
# Set up service account role ARN (from installation steps) export FSX_CSI_ROLE_ARN=$(aws iam get-role --role-name $FSX_CSI_ROLE_NAME --query 'Role.Arn' --output text 2>/dev/null || echo "Role not found") echo "FSx CSI Role ARN: $FSX_CSI_ROLE_ARN" -
FSx CSI 드라이버 추가 기능 설치:
aws eks create-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name aws-fsx-csi-driver \ --addon-version v1.6.0-eksbuild.1 \ --service-account-role-arn $FSX_CSI_ROLE_ARN \ --region $REGION # Wait for add-on to be active aws eks wait addon-active --cluster-name $EKS_CLUSTER_NAME --addon-name aws-fsx-csi-driver --region $REGION # Verify FSx CSI driver is running kubectl get pods -n kube-system | grep fsx
3단계: 모든 종속성 확인
누락된 종속성을 설치한 후 추론 연산자 설치를 다시 시도하기 전에 올바르게 실행되고 있는지 확인합니다.
# Check all required add-ons are active aws eks describe-addon --cluster-name $EKS_CLUSTER_NAME --addon-name aws-mountpoint-s3-csi-driver --region $REGION aws eks describe-addon --cluster-name $EKS_CLUSTER_NAME --addon-name aws-fsx-csi-driver --region $REGION aws eks describe-addon --cluster-name $EKS_CLUSTER_NAME --addon-name metrics-server --region $REGION aws eks describe-addon --cluster-name $EKS_CLUSTER_NAME --addon-name cert-manager --region $REGION # Verify all pods are running kubectl get pods -n kube-system | grep -E "(mountpoint|fsx|metrics-server)" kubectl get pods -n cert-manager
모델 배포 중에 추론 사용자 지정 리소스 정의가 누락되었습니다.
문제: 모델 배포를 생성하려고 할 때 사용자 지정 리소스 정의(CRDs)가 누락되었습니다. 이 문제는 마무리자가 있는 모델 배포를 정리하지 않고 이전에 추론 추가 기능을 설치하고 삭제한 경우 발생합니다.
증상 및 진단:
근본 원인:
먼저 모든 모델 배포를 제거하지 않고 추론 추가 기능을 삭제하면 최종 사용자가 있는 사용자 지정 리소스가 클러스터에 남아 있습니다. CRDs를 삭제하려면 먼저 이러한 최종 사용자를 완료해야 합니다. 추가 기능 삭제 프로세스는 CRD 삭제가 완료될 때까지 기다리지 않으므로 CRDs가 종료 상태로 유지되고 새 설치가 방지됩니다.
이 문제를 진단하려면
-
CRDs 존재하는지 확인합니다.
kubectl get crd | grep inference.sagemaker.aws.amazon.com -
멈춘 사용자 지정 리소스가 있는지 확인합니다.
# Check for JumpStartModel resources kubectl get jumpstartmodels -A # Check for InferenceEndpointConfig resources kubectl get inferenceendpointconfigs -A -
멈춘 리소스가 있는지 최종 사용자를 검사합니다.
# Example for a specific JumpStartModel kubectl get jumpstartmodels <model-name> -n <namespace> -o jsonpath='{.metadata.finalizers}' # Example for a specific InferenceEndpointConfig kubectl get inferenceendpointconfigs <config-name> -n <namespace> -o jsonpath='{.metadata.finalizers}'
해결 방법:
추론 추가 기능을 제거할 때 삭제되지 않은 모든 모델 배포에서 최종 사용자를 수동으로 제거합니다. 중단된 각 사용자 지정 리소스에 대해 다음 단계를 완료합니다.
JumpStartModel 리소스에서 최종 사용자를 제거하려면
-
모든 네임스페이스에서 모든 JumpStartModel 리소스를 나열합니다.
kubectl get jumpstartmodels -A -
각 JumpStartModel 리소스에 대해 리소스를 패치하여 metadata.finalizer를 빈 배열로 설정하여 최종자를 제거합니다.
kubectl patch jumpstartmodels <model-name> -n <namespace> -p '{"metadata":{"finalizers":[]}}' --type=merge다음 예제에서는 kv-l1-only라는 리소스를 패치하는 방법을 보여줍니다.
kubectl patch jumpstartmodels kv-l1-only -n default -p '{"metadata":{"finalizers":[]}}' --type=merge -
모델 인스턴스가 삭제되었는지 확인합니다.
kubectl get jumpstartmodels -A모든 리소스가 정리되면 다음 출력이 표시됩니다.
Error from server (NotFound): Unable to list "inference.sagemaker.aws.amazon.com/v1, Resource=jumpstartmodels": the server could not find the requested resource (get jumpstartmodels.inference.sagemaker.aws.amazon.com) -
JumpStartModel CRD가 제거되었는지 확인합니다.
kubectl get crd | grep jumpstartmodels---inference---sagemaker---aws.amazon.com.rproxy.govskope.caCRD가 성공적으로 제거되면이 명령은 출력을 반환하지 않습니다.
InferenceEndpointConfig 리소스에서 최종 사용자를 제거하려면
-
모든 네임스페이스에서 모든 InferenceEndpointConfig 리소스를 나열합니다.
kubectl get inferenceendpointconfigs -A -
각 InferenceEndpointConfig 리소스에 대해 최종자를 제거합니다.
kubectl patch inferenceendpointconfigs <config-name> -n <namespace> -p '{"metadata":{"finalizers":[]}}' --type=merge다음 예제에서는 my-inference-config라는 리소스를 패치하는 방법을 보여줍니다.
kubectl patch inferenceendpointconfigs my-inference-config -n default -p '{"metadata":{"finalizers":[]}}' --type=merge -
구성 인스턴스가 삭제되었는지 확인합니다.
kubectl get inferenceendpointconfigs -A모든 리소스가 정리되면 다음 출력이 표시됩니다.
Error from server (NotFound): Unable to list "inference.sagemaker.aws.amazon.com/v1, Resource=inferenceendpointconfigs": the server could not find the requested resource (get inferenceendpointconfigs.inference.sagemaker.aws.amazon.com) -
InferenceEndpointConfig CRD가 제거되었는지 확인합니다.
kubectl get crd | grep inferenceendpointconfigs---inference---sagemaker---aws.amazon.com.rproxy.govskope.caCRD가 성공적으로 제거되면이 명령은 출력을 반환하지 않습니다.
추론 추가 기능을 다시 설치하려면
멈춘 리소스를 모두 정리하고 CRDs 제거되었는지 확인한 후 추론 추가 기능을 다시 설치합니다. 자세한 내용은 EKS 추가 기능을 사용하여 추론 연산자 설치 단원을 참조하십시오.
확인:
-
추론 추가 기능이 성공적으로 설치되었는지 확인합니다.
aws eks describe-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION \ --query "addon.{Status:status,Health:health}" \ --output table상태는 활성이어야 하고 상태는 정상이어야 합니다.
-
CRDs 올바르게 설치되었는지 확인합니다.
kubectl get crd | grep inference.sagemaker.aws.amazon.com출력에 추론 관련 CRDs가 나열됩니다.
-
새 모델 배포 생성을 테스트하여 문제가 해결되었는지 확인합니다.
# Create a test deployment using your preferred method kubectl apply -f <your-model-deployment.yaml>
예방책:
이 문제를 방지하려면 추론 추가 기능을 제거하기 전에 다음 단계를 완료하세요.
-
모든 모델 배포를 삭제합니다.
# Delete all JumpStartModel resources kubectl delete jumpstartmodels --all -A # Delete all InferenceEndpointConfig resources kubectl delete inferenceendpointconfigs --all -A # Wait for all resources to be fully deleted kubectl get jumpstartmodels -A kubectl get inferenceendpointconfigs -A -
모든 사용자 지정 리소스가 삭제되었는지 확인합니다.
-
모든 리소스가 정리되었는지 확인한 후 추론 추가 기능을 삭제합니다.
cert-manager 누락으로 인해 추론 추가 기능 설치 실패
문제: cert-manager EKS 추가 기능이 설치되지 않아 추론 연산자 추가 기능 생성이 실패하여 사용자 지정 리소스 정의(CRDs.
증상 및 진단:
오류 메시지:
추가 기능 생성 로그 또는 추론 연산자 로그에 다음 오류가 나타납니다.
Missing required CRD: certificaterequests.cert-manager.io. The cert-manager add-on is not installed. Please install cert-manager and see the troubleshooting guide for more information.
진단 단계:
-
cert-manager가 설치되어 있는지 확인합니다.
# Check for cert-manager CRDs kubectl get crd | grep cert-manager kubectl get pods -n cert-manager # Check EKS add-on status aws eks describe-addon --cluster-name $EKS_CLUSTER_NAME --addon-name cert-manager --region $REGION 2>/dev/null || echo "Cert-manager not installed" -
추론 연산자 추가 기능 상태 확인:
aws eks describe-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION \ --query "addon.{Status:status,Health:health,Issues:issues}" \ --output json
해결 방법:
1단계: cert-manager 추가 기능 설치
-
cert-manager EKS 추가 기능을 설치합니다.
aws eks create-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name cert-manager \ --addon-version v1.18.2-eksbuild.2 \ --region $REGION -
cert-manager 설치 확인:
# Wait for add-on to be active aws eks wait addon-active --cluster-name $EKS_CLUSTER_NAME --addon-name cert-manager --region $REGION # Verify cert-manager pods are running kubectl get pods -n cert-manager # Verify CRDs are installed kubectl get crd | grep cert-manager | wc -l # Expected: Should show multiple cert-manager CRDs
2단계: 추론 연산자 설치 재시도
-
cert-manager를 설치한 후 추론 연산자 설치를 다시 시도합니다.
# Delete the failed add-on if it exists aws eks delete-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION 2>/dev/null || echo "Add-on not found, proceeding with installation" # Wait for deletion to complete sleep 30 # Reinstall the inference operator add-on aws eks create-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --addon-version v1.0.0-eksbuild.1 \ --configuration-values file://addon-config.json \ --region $REGION -
설치를 모니터링합니다.
# Check installation status aws eks describe-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION \ --query "addon.{Status:status,Health:health}" \ --output table # Verify inference operator pods are running kubectl get pods -n hyperpod-inference-system
ALB 컨트롤러 누락으로 인해 추론 추가 기능 설치 실패
문제: AWS Load Balancer 컨트롤러가 설치되지 않았거나 추론 추가 기능에 대해 제대로 구성되지 않았기 때문에 추론 연산자 추가 기능 생성이 실패합니다.
증상 및 진단:
오류 메시지:
추가 기능 생성 로그 또는 추론 연산자 로그에 다음 오류가 나타납니다.
ALB Controller not installed (missing aws-load-balancer-controller pods). Please install the Application Load Balancer Controller and see the troubleshooting guide for more information.
진단 단계:
-
ALB 컨트롤러가 설치되어 있는지 확인합니다.
# Check for ALB Controller pods kubectl get pods -n kube-system | grep aws-load-balancer-controller kubectl get pods -n hyperpod-inference-system | grep aws-load-balancer-controller # Check ALB Controller service account kubectl get serviceaccount aws-load-balancer-controller -n kube-system 2>/dev/null || echo "ALB Controller service account not found" kubectl get serviceaccount aws-load-balancer-controller -n hyperpod-inference-system 2>/dev/null || echo "ALB Controller service account not found in inference namespace" -
추론 연산자 추가 기능 구성을 확인합니다.
aws eks describe-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION \ --query "addon.{Status:status,Health:health,ConfigurationValues:configurationValues}" \ --output json
해결 방법:
설정에 따라 다음 옵션 중 하나를 선택합니다.
옵션 1: 추론 추가 기능이 ALB 컨트롤러를 설치하도록 허용(권장)
-
추가 기능 구성에서 ALB 역할이 생성되고 올바르게 구성되었는지 확인합니다.
# Verify ALB role exists export ALB_ROLE_ARN=$(aws iam get-role --role-name alb-role --query 'Role.Arn' --output text 2>/dev/null || echo "Role not found") echo "ALB Role ARN: $ALB_ROLE_ARN" # Update your addon-config.json to enable ALB cat > addon-config.json << EOF { "executionRoleArn": "$EXECUTION_ROLE_ARN", "tlsCertificateS3Bucket": "$BUCKET_NAME", "hyperpodClusterArn": "$HYPERPOD_CLUSTER_ARN", "alb": { "enabled": true, "serviceAccount": { "create": true, "roleArn": "$ALB_ROLE_ARN" } }, "keda": { "auth": { "aws": { "irsa": { "roleArn": "$KEDA_ROLE_ARN" } } } } } EOF
옵션 2: 기존 ALB 컨트롤러 설치 사용
-
ALB 컨트롤러가 이미 설치되어 있는 경우 기존 설치를 사용하도록 추가 기능을 구성합니다.
# Update your addon-config.json to disable ALB installation cat > addon-config.json << EOF { "executionRoleArn": "$EXECUTION_ROLE_ARN", "tlsCertificateS3Bucket": "$BUCKET_NAME", "hyperpodClusterArn": "$HYPERPOD_CLUSTER_ARN", "alb": { "enabled": false }, "keda": { "auth": { "aws": { "irsa": { "roleArn": "$KEDA_ROLE_ARN" } } } } } EOF
3단계: 추론 연산자 설치 재시도
-
업데이트된 구성으로 추론 연산자 추가 기능을 다시 설치합니다.
# Delete the failed add-on if it exists aws eks delete-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION 2>/dev/null || echo "Add-on not found, proceeding with installation" # Wait for deletion to complete sleep 30 # Reinstall with updated configuration aws eks create-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --addon-version v1.0.0-eksbuild.1 \ --configuration-values file://addon-config.json \ --region $REGION -
ALB 컨트롤러가 작동하는지 확인합니다.
# Check ALB Controller pods kubectl get pods -n hyperpod-inference-system | grep aws-load-balancer-controller kubectl get pods -n kube-system | grep aws-load-balancer-controller # Check service account annotations kubectl describe serviceaccount aws-load-balancer-controller -n hyperpod-inference-system 2>/dev/null kubectl describe serviceaccount aws-load-balancer-controller -n kube-system 2>/dev/null
KEDA 연산자 누락으로 인해 추론 추가 기능 설치 실패
문제: KEDA(Kubernetes Event Driven Autoscaler) 연산자가 설치되지 않았거나 추론 추가 기능에 대해 제대로 구성되지 않았기 때문에 추론 연산자 추가 기능 생성이 실패합니다.
증상 및 진단:
오류 메시지:
추가 기능 생성 로그 또는 추론 연산자 로그에 다음 오류가 나타납니다.
KEDA operator not installed (missing keda-operator pods). KEDA can be installed separately in any namespace or via the Inference addon.
진단 단계:
-
KEDA 연산자가 설치되어 있는지 확인합니다.
# Check for KEDA operator pods in common namespaces kubectl get pods -n keda-system | grep keda-operator 2>/dev/null || echo "KEDA not found in keda-system namespace" kubectl get pods -n kube-system | grep keda-operator 2>/dev/null || echo "KEDA not found in kube-system namespace" kubectl get pods -n hyperpod-inference-system | grep keda-operator 2>/dev/null || echo "KEDA not found in inference namespace" # Check for KEDA CRDs kubectl get crd | grep keda 2>/dev/null || echo "KEDA CRDs not found" # Check KEDA service account kubectl get serviceaccount keda-operator -A 2>/dev/null || echo "KEDA service account not found" -
추론 연산자 추가 기능 구성을 확인합니다.
aws eks describe-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION \ --query "addon.{Status:status,Health:health,ConfigurationValues:configurationValues}" \ --output json
해결 방법:
설정에 따라 다음 옵션 중 하나를 선택합니다.
옵션 1: 추론 추가 기능을 통해 KEDA 설치(권장)
-
추가 기능 구성에서 KEDA 역할이 생성되고 올바르게 구성되었는지 확인합니다.
# Verify KEDA role exists export KEDA_ROLE_ARN=$(aws iam get-role --role-name keda-operator-role --query 'Role.Arn' --output text 2>/dev/null || echo "Role not found") echo "KEDA Role ARN: $KEDA_ROLE_ARN" # Update your addon-config.json to enable KEDA cat > addon-config.json << EOF { "executionRoleArn": "$EXECUTION_ROLE_ARN", "tlsCertificateS3Bucket": "$BUCKET_NAME", "hyperpodClusterArn": "$HYPERPOD_CLUSTER_ARN", "alb": { "serviceAccount": { "create": true, "roleArn": "$ALB_ROLE_ARN" } }, "keda": { "enabled": true, "auth": { "aws": { "irsa": { "roleArn": "$KEDA_ROLE_ARN" } } } } } EOF
옵션 2: 기존 KEDA 설치 사용
-
KEDA가 이미 설치되어 있는 경우 기존 설치를 사용하도록 추가 기능을 구성합니다.
# Update your addon-config.json to disable KEDA installation cat > addon-config.json << EOF { "executionRoleArn": "$EXECUTION_ROLE_ARN", "tlsCertificateS3Bucket": "$BUCKET_NAME", "hyperpodClusterArn": "$HYPERPOD_CLUSTER_ARN", "alb": { "serviceAccount": { "create": true, "roleArn": "$ALB_ROLE_ARN" } }, "keda": { "enabled": false } } EOF
3단계: 추론 연산자 설치 재시도
-
업데이트된 구성으로 추론 연산자 추가 기능을 다시 설치합니다.
# Delete the failed add-on if it exists aws eks delete-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --region $REGION 2>/dev/null || echo "Add-on not found, proceeding with installation" # Wait for deletion to complete sleep 30 # Reinstall with updated configuration aws eks create-addon \ --cluster-name $EKS_CLUSTER_NAME \ --addon-name amazon-sagemaker-hyperpod-inference \ --addon-version v1.0.0-eksbuild.1 \ --configuration-values file://addon-config.json \ --region $REGION -
KEDA가 작동하는지 확인합니다.
# Check KEDA pods kubectl get pods -n hyperpod-inference-system | grep keda kubectl get pods -n kube-system | grep keda kubectl get pods -n keda-system | grep keda 2>/dev/null # Check KEDA CRDs kubectl get crd | grep scaledobjects kubectl get crd | grep scaledjobs # Check KEDA service account annotations kubectl describe serviceaccount keda-operator -n hyperpod-inference-system 2>/dev/null kubectl describe serviceaccount keda-operator -n kube-system 2>/dev/null kubectl describe serviceaccount keda-operator -n keda-system 2>/dev/null