본문 바로가기
카테고리 없음

[AEWS4기] AI Agent in EKS Automode (1)

by 서어켜엉 2026. 5. 17.

 

https://catalog.workshops.aws/k8sagenticplatform/ko-KR

 

Architect and deploy advanced Agentic AI platforms on Amazon EKS

Build a complete Agentic AI platform on Amazon EKS. Deploy LLMs on AWS Neuron, set up a unified API gateway (Lite LLM) with observability (Langfuse), and create intelligent agents using LangGraph and MCP. Through a credit underwriting app, implement LLM-as

catalog.workshops.aws

해당 워크샵 내용을 정리한 것으로, 실제 실습은 진행이 불가능하여, 이론만 정리함.

 

Module 1 - 모델 상호작용

Open WebUI - 채팅 인터페이스

ChatGPT 와 유사한 채팅 인터페이스 기반의 자체 호스팅 웹 페이지로, 아래와 같은 기능을 제공한다.

  • 최신 채팅 인터페이스
  • 다중 모델 지원 - 여러 모델 간 원활한 전환
  • 대화 관리
  • 파일 업로드
  • 프롬프트 템플릿
  • 다중 사용자 지원

Helm 차트

제공되는 helm 차트를 사용해서 배포를 진행하면 된다.

# values.template.yaml - 주요 구성
nameOverride: openwebui

# AWS Load Balancer를 위한 Ingress 구성
ingress:
  enabled: true
  annotations:
    alb.ingress.kubernetes.io/target-type: ip
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]'
  host: openwebui.${DOMAIN}

# LiteLLM API Gateway 연결
openaiBaseApiUrl: http://litellm.litellm:4000/v1
extraEnvVars:
  - name: OPENAI_API_KEY
    value: ${LITELLM_API_KEY}

# 로컬 Ollama 비활성화 (외부 모델 사용)
ollama:
  enabled: false
pipelines:
  enabled: false

# 대화를 위한 영구 스토리지
persistence:
  enabled: true
  size: 100Gi

# 리소스 할당
resources:
  requests:
    cpu: 1 
    memory: 2Gi
  limits:
    memory: 2Gi

 

 

주요 구성 결정 사항

1. LiteLLM 통합

Open WebUI는 모델 엔드포인트에 직접 연결하는 대신 LiteLLM에 연결한다.

  • 통합 API - 모든 모델에 대한 단일 엔드포인트
  • 로드 밸런싱 - 모델 레플리카 간 자동 분산
  • Fallback 지원 - 모델간 원활한 전환

 

2. AWS Loadbalancer 통합

Ingress 구성은 Application Loadbalancer(ALB) 를 생성한다.

  • HTTPS Termination : SSL/TLS를 로드밸런서에서 처리
  • Target Type IP : 더 나은 성능을 위한 직접 Pod 네트워킹
  • 커스텀 도메인 : 개인 도메인을 사용해서 커스텀하게 설정가능

 

3. 영구 스토리지

100Gi EBS 스토리지(EKS Automode가 자동으로 프로비저닝)는 다음을 보장한다.

  • 대화 기록 - 모든 채팅이 보존됨
  • 사용자 설정 - 세션 간 설정 유지
  • 안정적인 성능 - 어플리케이션의 일관된 성능

Open WebUI 배포 방법

리포지토리 구성

# Helm 리포지토리 추가됨
helm repo add open-webui https://open-webui.github.io/helm-charts
helm repo update

커스텀 values로 설치

# Open WebUI가 커스텀 구성으로 설치됨
helm upgrade --install openwebui open-webui/open-webui \
  --namespace openwebui \
  --create-namespace \
  -f values.rendered.yaml

 

 

vLLM 자체 호스팅 모델 서빙

1단계 : 서빙중인 모델 확인

# 현재 실행 중인 vLLM 모델 확인
kubectl get pods -n vllm

# 채팅 경험 뒤의 실제 deployments 확인
kubectl get deployments -n vllm -o wide

# 모델을 호스팅하는 노드 확인
kubectl get pods -n vllm -o wide

 

2단계 : 실제 구성파일 확인하기

# vLLM 구성으로 이동
ls /workshop/components/llm-model/vllm/

# 방금 사용한 Qwen 3 배포 살펴보기
cat /workshop/components/llm-model/vllm/model-qwen3-8b-neuron.rendered.yaml

 

3단계 : 모델의 요청 처리 관찰

# Qwen 3 모델 로그를 실시간으로 관찰
# 사용한 모델의 로그를 관찰해야함.
kubectl logs -f --tail=0 -n vllm deployment/qwen3-8b-neuron

 

 

vLLM이란?

오픈소스 LLM 추론 및 서빙 라이브러리

  • 높은 처리량: 여러 요청을 효율적으로 서빙하도록 최적화
  • Continuous Batching: 최적의 하드웨어 활용을 위한 동적 요청 배칭
  • PagedAttention: 긴 컨텍스트를 위한 효율적인 메모리 관리
  • Tensor Parallelism: 여러 가속기에 모델 분산
  • OpenAI 호환 API: OpenAI API의 드롭인 대체

 

 


let textNodes = document.querySelectorAll("div.tt_article_useless_p_margin.contents_style > *:not(figure):not(pre)"); textNodes.forEach(function(a) { a.innerHTML = a.innerHTML.replace(/`(.*?)`/g, '$1'); });