콘텐츠로 이동
AggregaAggrega
언어 선택: 한국어
이 페이지는 기계 번역되었습니다. 영어 원문 읽기.

Google ADK 에이전트 가져오기

이 워크스루에서는 Google의 Agent Development Kit(ADK)로 구축한 애플리케이션의 Agent Config(주문에 관한 고객의 질문에 답하는 에이전트 하나)를 가져오고, 애플리케이션을 Docker Compose용으로 빌드합니다. 가져오기는 빌드가 읽는 모든 파일의 초안을 작성합니다: 에이전트와 그 Gemini 모델, 에이전트가 변수 참조로 모델에 제시하는 키, 그리고 각각의 구현입니다. 어떤 구성에도 들어 있지 않은 유일한 값인, 애플리케이션이 실행되는 이미지는 한 번만 묻습니다. 아래의 모든 파일과 모든 출력 블록은 실제 실행에서 나온 것입니다. 구성과 워크스루의 각 단계는 import-google-adk 예제에 있으며, 그곳의 검사 스크립트가 가져오기를 다시 실행하여 작성하는 내용, 출력하는 내용, 그리고 이 페이지가 인용하는 블록을 그곳에 보관된 파일과 비교하고, 가져오기가 작성한 것을 검증하고 빌드합니다.

예제 생성하기

이 페이지의 명령으로 이 가져오기를 실행하거나, AI 어시스턴트가 대신 실행하게 할 수 있습니다.

예제 이름을 딴 새 폴더에 예제를 씁니다:

Terminal window
aggrega scaffold --example import-google-adk

그런 다음 이어서 실행할 명령을 출력합니다. 첫 번째 명령은 새 폴더로 이동합니다. 그 뒤의 명령은 아래와 같으며, 새 폴더 안의 source 폴더로 이동합니다. 이 폴더에는 이 페이지가 가져오는 내용이 들어 있으며, 가져오기는 여기서 실행됩니다:

Terminal window
cd import-google-adk

Visual Studio Code에서 연 스캐폴딩된 예제의 source 폴더. 에이전트 구성이 표시됩니다: google_search 도구를 사용하는 gemini-2.5-flash 기반 support_agent.

프로젝트

ADK는 애플리케이션의 에이전트를 코드 대신 Agent Config 파일로 선언할 수 있습니다. adk create --type=config는 루트 에이전트의 구성인 root_agent.yaml과 그 옆의 환경 파일을 작성합니다. 이 워크스루를 위해 작성된 이 파일은 Gemini의 gemini-2.5-flash를 사용하는 에이전트 하나를 ADK에 포함된 Google Search 도구와 함께 선언합니다:

# yaml-language-server: $schema=https://raw.githubusercontent.com/google/adk-python/refs/heads/main/src/google/adk/agents/config_schemas/AgentConfig.json
name: support_agent
model: gemini-2.5-flash
description: Answers a customer's question about their order.
instruction: |
You answer customers' questions about their orders. When a customer asks
where a parcel is, search the web for the tracking page of the company
shipping it.
tools:
- name: google_search

가져오기는 환경 파일을 절대 읽지 않습니다. 이 파일에는 보통 애플리케이션이 Gemini에 보내는 키가 들어 있으므로, 예제에는 환경 파일이 없습니다. 프로젝트 루트에서는 .aggrega-config.yaml이 폴더를 작업 공간으로 만듭니다:

# The workspace key marks this directory as the workspace root, so an import run
# here writes its drafts beside support_agent/.
workspace: {}
# The registry the importer is fetched from the first time an import needs it.
default_registry: hub.aggrega.ai

가져오기는 카탈로그의 ADK 에이전트 및 Gemini 모델 Components를 참조하고, --target은 그 카탈로그의 Recipes로부터 Manifest 초안을 작성합니다. 작업 공간이 카탈로그 폴더를 지정하지 않으므로, 가져오기는 임포터를 받아 오는 레지스트리에서 표준 라이브러리 카탈로그를 읽습니다. 이는 게시된 카탈로그의 서명된 스냅샷으로, 첫 번째 가져오기가 받아 와서 검증한 뒤 작업 공간의 콘텐츠 캐시에 보관하며, 가져오기가 초안 옆에 작성하는 기록에 그 다이제스트로 지정됩니다. AGGREGA_CATALOG_DIRS에서 또는 workspace.catalog_dirs 아래에서 자체 카탈로그 폴더를 지정하는 작업 공간은 대신 그 폴더들을 기준으로 가져옵니다.

가져오기가 묻는 항목

Agent Config는 에이전트의 모델을 지정하지만 애플리케이션이 실행되는 이미지는 지정하지 않습니다. 그 이미지는 프로젝트에서 빌드합니다. 카탈로그에는 ADK로 구축한 애플리케이션을 위한 기본 이미지가 없으므로 가져오기가 이를 묻습니다. 터미널에서는 묻고, 답변을 초안과 가져오는 디렉터리 support_agent/ 안의 답변 파일 import-answers.yaml에 기록하므로, 다음 가져오기는 그곳에서 답변을 읽고 아무것도 묻지 않습니다. 터미널이 없으면 — 지속적 통합에서나 파이프를 통해 — 아무것도 묻지 않습니다: 키가 비어 있는 파일을 작성하고, 그 파일을 지정하며 중지합니다. 예제에는 이미 이미지가 답변된 파일이 있으며, ghcr.io/example/support-agent:1.0.0은 빌드하는 이미지를 나타냅니다:

# Values the import could not draft from the source, keyed by the drafted file and the key path inside
# it. Write each one beside its key; an import of the same source, and a sync, read them from here and
# ask nothing. A secret is never written here: its key asks where the secret comes from — a variable
# name, ${NAME}, or the name of a Kubernetes Secret.
release.yaml:
# Container image running the application built on ADK, serving its API on infra.port on every
# interface.
spec.components.support-agent.infra.image: "ghcr.io/example/support-agent:1.0.0"
# The origin of the secret value, written by the operator in the Release. Read exactly as
# values.origin is. Write it here or in values.origin, never in both. A secret: name where it comes
# from, never the value.
spec.components.support-agent.uses.model.gemini-2-5-flash.features.credential.infra.origin: "google-api-key"

두 번째 답변은 --target helm을 사용한 Kubernetes용 빌드를 위한 것입니다: 그곳에서 에이전트는 Kubernetes Secret에서 Gemini API 키를 읽으며, 답변은 키가 아니라 Secret의 이름인 google-api-key입니다. Docker Compose용 빌드는 대신 셸에서 키를 읽으므로 이 가져오기는 그 답변을 사용하지 않습니다. 가져오기 답변 파일에서 파일, 질문, 그리고 시크릿 답변에 관한 규칙을 설명합니다.

aggrega import에는 다른 곳에 보관된 응답 파일을 지정하는 --answers를 비롯하여 이 명령이 받는 모든 플래그가 나열되어 있습니다.

source로 이동합니다:

Terminal window
cd source

가져오기 실행

에이전트의 디렉터리를 지정합니다. 가져오기는 그 안의 root_agent.yaml을 읽습니다:

Terminal window
aggrega import support_agent --target compose

표준 출력에는 작성한 것을 나열합니다:

wrote aggregate.yaml
wrote release.yaml
wrote manifest.yaml
wrote .aggrega-import.json

표준 오류에는 다음과 같이 출력합니다. 여기서 <workspace>는 명령을 실행한 폴더를 나타냅니다:

[… omitted: a warning that the importer runs unverified, printed where its module is read from beside its Plugin entity in a catalog folder rather than fetched]
read as the google-adk format, with drafted paths relative to <workspace>
info: the answers file <workspace>/support_agent/import-answers.yaml also answers spec.components.support-agent.uses.model.gemini-2-5-flash.features.credential.infra.origin in release.yaml, which these drafts do not leave empty; those answers are kept there and not applied
mapped support_agent (agent) to core/ai-agent/google-adk as a reference, NONE
mapped gemini-2.5-flash (model) to core/ai-model/gemini as a reference, NONE
made no choice for google_search (tool)
Pull complete: <workspace>/release.lock (entities=8, source_artifacts=0, external_inputs=0)

편집기에서 실행한 가져오기: 초안 Aggregate, Release, Manifest가 에이전트 구성 옆에 나타나고, Aggrega 출력에는 에이전트와 모델이 매핑된 방식과 기록된 파일이 나열되며, 알림에는 가져오기가 google-adk로 인식하여 파일 3개의 초안을 작성했다고 표시됩니다.

  • info 줄은 Docker Compose 초안이 사용하지 않는 응답을 나타내며, 이 응답은 Kubernetes용 빌드를 위해 응답 파일에 보관됩니다.
  • mapped 줄은 에이전트가 표준 라이브러리의 ADK 에이전트인 core/ai-agent/google-adk의 인스턴스이고, 에이전트가 지정하는 모델이 core/ai-model/gemini의 인스턴스임을 나타냅니다. 등급은 NONE으로 표시됩니다. ADK 가져오기는 각각을 카탈로그와 비교하여 평가하는 대신, 구성이 지정하는 이름으로 이 Components를 참조하기 때문입니다.
  • made no choice 줄은 Google Search 도구에 대해서는 아무것도 초안으로 작성되지 않는다는 것을 나타냅니다. 이는 ADK에 포함된 도구이며 애플리케이션 내부에서 실행됩니다.
  • Pull complete 줄은 가져오기가 초안으로 작성된 Release가 의존하는 것을 aggrega pull처럼 release.lock으로 가져오는 것으로, 초안을 즉시 검증하고 빌드할 수 있게 합니다. --offline에서는 가져오기가 아무것도 가져오지 않고 실행할 aggrega pull을 알려 줍니다.

작성하는 내용

Aggregate, Release, Manifest의 이름은 imported/support-agent입니다. 루트 에이전트의 name인 support_agent를 support-agent로 줄인 것입니다. 네임스페이스는 임포터의 target_namespace 설정이 정하며, 다른 값을 설정하지 않으면 imported입니다(설정).

aggregate.yaml — 제시하는 키가 연결에 선언된 채로 모델에 연결된 에이전트와 그 모델이며, 무엇을 읽었고 무엇을 읽지 않았는지 설명하는 주석으로 시작합니다:

# Google ADK agent configurations read:
# - root_agent.yaml
# Not read: the application's code, which defines the tools, callbacks and agents a configuration names by their code, nor the environment file ADK's scaffold writes beside root_agent.yaml; the application runs in the image the Release names for each instance, and loads its configurations itself.
# ADK states that its Agent Config is experimental. An agent's model is a Gemini model by default; ADK serves some other providers' models by name through classes of its own, such as claude-sonnet-4-5 and gpt-4o, and others through a LiteLLM model string.
apiVersion: aggrega.ai/v1beta1
kind: Aggregate
metadata:
name: imported/support-agent
version: 0.1.0
description: Draft Aggregate imported from a source in the google-adk format.
spec:
components:
# The agent tree of root_agent.yaml, served from its root agent support_agent.
# Tools ADK ships, which run inside the application, drafted as no Component: google_search.
support-agent:
type: core/ai-agent/google-adk
values:
description: "Answers a customer's question about their order."
uses:
model:
gemini-2-5-flash:
target: gemini-2-5-flash
# For the compose target, the lines below declare credential on gemini-2-5-flash: a secret the Release alone attaches arrives under the key value, so each is declared with a key of its own and no two arrive under one; the Release attaches its origin, naming this type or none.
features:
credential:
type: core/secret-value
values:
key: GOOGLE_API_KEY
# The model gemini-2.5-flash.
gemini-2-5-flash:
type: core/ai-model/gemini
values:
model: "gemini-2.5-flash"

ADK는 루트 에이전트에서 애플리케이션을 제공하므로, 초안은 에이전트 트리마다 하나의 인스턴스를 두고 루트 에이전트의 이름을 붙입니다. 에이전트의 instruction은 옮겨지지 않습니다. 애플리케이션이 자체 구성에서 이를 읽으며, 그 구성은 이미지 안에 있습니다.

ADK는 Gemini 클래스를 통해 gemini-2.5-flash를 제공하며, 이 클래스는 요청을 Gemini API로 보냅니다. 따라서 초안은 모델을 에이전트의 model 소켓에 연결하며, 이 소켓은 Gemini API만 허용합니다. Gemini는 호스팅 서비스이므로 에이전트의 Component는 자격 증명을 담지 않은 Gemini로의 연결을 거부합니다. 연결은 GOOGLE_API_KEY 키 아래에 자격 증명을 하나 선언합니다. ADK가 그 밖의 방식으로 제공하는 모델, 즉 ADK가 자체 클래스를 통해 제공하는 gpt-4o 같은 이름이나 openai/gpt-4o 같은 LiteLLM 모델 문자열은 어디에도 연결되지 않습니다. 인스턴스 위의 주석이 그 모델을 알려 주며, 연결은 에이전트 트리가 무엇이 되는가에서 설명하는 대로 직접 하도록 남겨 둡니다.

release.yaml — 환경, 이미지, 게시된 포트, 키를 가져오는 위치:

apiVersion: aggrega.ai/v1beta1
kind: Release
metadata:
name: imported/support-agent
# environment is a drafted default, since no source names the environment this Release deploys to; change it to name the one it deploys to.
environment: development
version: 0.1.0
description: Draft Release imported from a source in the google-adk format.
spec:
aggregate: imported/support-agent
manifest: imported/support-agent
components:
support-agent:
infra:
# Left for the Release, since the source cannot supply it: infra.image, the container image running the application built on ADK, holding its configurations
image: "ghcr.io/example/support-agent:1.0.0"
# Published on this machine's loopback address, 127.0.0.1: reachable from this machine only, by any process running on it. Delete this line to keep the service internal.
published_port: 8000
uses:
model:
gemini-2-5-flash:
features:
credential:
type: core/secret-value
infra:
# Attached by reference, never as a value: the credential support-agent presents to gemini-2-5-flash on its model connection (the source names no variable for it, so it is read from the one Google's Gemini API's client libraries read the API key from), read from the variable GOOGLE_API_KEY, which a target substituting variable references, as Docker Compose does when the stack starts, reads from the environment, so no file carries the value.
origin: "${GOOGLE_API_KEY}"
gemini-2-5-flash: {}

환경 development는 어떤 구성도 환경을 지정하지 않기 때문에 가져오기가 기록하는 기본값입니다. Release를 다른 곳에 배포하는 경우 변경하십시오. 이미지는 가져오기가 support_agent/import-answers.yaml에서 읽은 답변입니다. published_port는 애플리케이션이 수신 대기하는 포트인 8000이므로, 애플리케이션은 사용자의 머신에서 http://127.0.0.1:8000으로 응답합니다. 주석에 적힌 대로 이 머신의 모든 프로세스는 그곳에서 애플리케이션에 접근할 수 있고 그 밖의 것은 접근할 수 없으며, 이 줄을 삭제하면 애플리케이션은 스택의 네트워크에만 남습니다. 구성이 키에 대한 변수를 지정하지 않으므로, 연결은 Gemini API 클라이언트 라이브러리가 읽는 변수인 ${GOOGLE_API_KEY}에서 키를 읽으며, 값이 아니라 항상 변수 참조로 읽습니다.

manifest.yaml — 각 유형의 Compose Recipe와, 키의 변수 참조를 Compose 파일에 그대로 기록하는 구현:

apiVersion: aggrega.ai/v1beta1
kind: Manifest
metadata:
name: imported/support-agent
version: 0.1.0
spec:
mappings:
components:
type:
core/ai-agent/google-adk: compose/google-adk
core/ai-model/gemini: compose/gemini
features:
type:
core/secret-value: compose/dotenv-secret

release.lock은 Release가 해석된 카탈로그 엔터티를 다이제스트로 기록하며, .aggrega-import.json은 가져오기가 작성한 내용의 기록으로, 이후의 aggrega import --sync가 이를 읽습니다.

검증 및 빌드

Terminal window
aggrega validate --release release.yaml
aggrega build --release release.yaml

검증 후 편집기에서 연 초안 Release. Aggrega 출력과 알림 모두 문제가 발견되지 않았다고 보고합니다.

초안 Release의 빌드: 탐색기에 dist 폴더가 나타나고, Aggrega 출력에 기록된 Docker Compose 파일이 나열되며, 알림에 파일 1개가 기록되었다고 표시됩니다.

검증 결과는 다음과 같습니다:

notice: LINT: Feature "core/secret-value" at core/secret-value:1.0.0 declares property "origin" in both values: and infra: pillars (path: origin)
release dependency validation passed: release.yaml (schema-pillar + dependency pillars)

그리고 빌드는 다음과 같습니다. 여기서 <workspace>는 실행한 폴더를 나타냅니다:

notice: LINT: Feature "core/secret-value" at core/secret-value:1.0.0 declares property "origin" in both values: and infra: pillars (path: origin)
[… omitted: a total build time, which differs per run]
Build completed: 1 file written to <workspace>/dist

notice 줄은 권고 사항입니다. 시크릿 Feature는 origin을 Aggregate의 values 또는 Release의 infra에서 받으며, 이 알림은 한 리프가 양쪽에 모두 선언되어 있음을 보고합니다. 어떤 판정도 바꾸지 않습니다.

dist/compose/docker-compose.yaml에 있는 에이전트의 서비스:

services:
support-agent:
image: ghcr.io/example/support-agent:1.0.0
environment:
PORT: "8000"
GOOGLE_API_KEY: ${GOOGLE_API_KEY}
ports:
- 127.0.0.1:8000:8000
[… omitted: the labels the build writes on every service, naming the Aggregate, the component, the environment and the compiler's version]
networks:
- compose

애플리케이션은 서버가 수신 대기하는 포트를 PORT로, 키를 GOOGLE_API_KEY로 받으며, ADK의 Gemini 클라이언트가 이 키를 Gemini API로 보냅니다. 모델에는 자체 서비스가 없습니다. 클라이언트는 Gemini API 자체의 주소로 요청을 보내며, 환경에서 다른 주소를 읽지 않습니다. 키는 변수 참조이며, 스택이 시작될 때 셸에서 값이 채워집니다. ADK 에이전트의 Compose Recipe는 Release가 에이전트의 infra에 published_port를 설정한 경우에만 사용자의 머신에 포트를 게시하며, 그 경우에도 루프백 주소인 127.0.0.1에만 게시합니다. 이 설정이 없으면 서비스는 스택의 네트워크에서만 접근할 수 있습니다.

AI 어시스턴트 사용

Aggrega의 도구로 설정된 AI 어시스턴트도 같은 일을 할 수 있습니다. 다음 프롬프트를 붙여 넣으십시오.

Aggrega 도구만 사용하고, 폴더를 직접 만들지 마십시오. Workspace 폴더에 아직 `import-google-adk` 폴더가 없으면, `example`을 `import-google-adk`로 설정하고 `dir`은 지정하지 않은 채 `scaffold` 도구를 한 번 호출하십시오. 이 도구는 예제를 새 `import-google-adk` 폴더에 기록하며, 그 안의 `source` 폴더에 이 페이지가 가져오는 내용이 들어 있습니다. 그런 다음 `workspace_root`를 `import-google-adk/source`로, `source`를 `support_agent`로, `target`을 `compose`로 설정하여 `import` 도구를 호출하십시오. 이 도구는 `support_agent` 폴더 안의 `import-answers.yaml`에서 필요한 답변을 읽고, 초안을 `import-google-adk/source`에 기록하며, 초안에 필요한 것을 풀합니다. 그런 다음 `workspace_root`를 `import-google-adk/source`로, `release`를 `release.yaml`로 설정하여 `validate` 도구를 호출하고, `workspace_root`를 `import-google-adk/source`로, `release`를 `release.yaml`로, `write`를 true로 설정하여 `build` 도구를 호출하십시오. 빌드가 기록한 파일을 알려 주십시오. 파일은 `import-google-adk/source/dist/` 아래에 있습니다.

VS Code에서 열기

Visual Studio Code용 Aggrega 확장을 설치한 상태에서, 가져오기가 초안을 기록한 import-google-adk/source 폴더를 VS Code에서 엽니다. 이 폴더에는 Release가 하나, 즉 초안 release.yaml만 있으므로 편집기가 이를 자동으로 선택하고, 초안을 편집하는 동안 해당 Release를 기준으로 검사하여 발견한 내용을 파일과 문제 패널에 표시합니다. 명령 팔레트의 Aggrega: Show topology graph는 Release의 구성 요소와 그 사이의 연결을 그립니다. Aggrega: Build, Aggrega: Preview build, Aggrega: Pull은 같은 Release에 대해 동작하며, 각각 작업 막대에 있는 Aggrega 보기의 Commands 패널에 있는 버튼이기도 합니다. Build는 파일을 폴더의 dist/에 기록합니다. 나머지 내용은 Visual Studio Code에서 Aggrega 사용하기에서 다룹니다.

실행하기

Docker Compose는 PORT를 포함하여 위에서 렌더링된 서비스로 이미지를 실행합니다. 이미지는 ADK API 서버의 기본 주소인 127.0.0.1이 아니라 모든 인터페이스에서 해당 포트로 수신 대기해야 합니다. ADK 자체 API 서버인 adk api_server는 구성 디렉터리를 있는 그대로 제공하므로 이미지에 직접 작성한 코드가 필요하지 않습니다. 프로젝트 루트의 support_agent/ 옆에 두는 Dockerfile:

FROM python:3.12-slim
RUN pip install --no-cache-dir google-adk==2.13.0
COPY support_agent/ /app/agents/support_agent/
CMD ["sh", "-c", "exec adk api_server --host 0.0.0.0 --port \"$PORT\" --auto_create_session /app/agents"]

adk api_server는 지정된 폴더의 에이전트 디렉터리를 제공하며, 명령은 여기에 PORT를 전달합니다. --auto_create_session은 /run에 대한 요청이 세션을 처음 지정할 때 그 세션을 열므로, 요청 하나로 에이전트에 도달합니다. 이미지를 빌드하고, support_agent/import-answers.yaml에서 ghcr.io/example/support-agent:1.0.0 대신 해당 이미지 이름을 기록한 다음, --sync로 다시 가져옵니다. 이 옵션은 새 답변을 초안에 기록하고 다시 풀합니다. 그런 다음 빌드합니다:

Terminal window
docker build -t support-agent:local .
aggrega import support_agent --sync
aggrega build --release release.yaml

그런 다음 셸에서 키를 설정하고 스택을 시작합니다:

Terminal window
export GOOGLE_API_KEY='your Gemini API key'
docker compose -p support-agent -f dist/compose/docker-compose.yaml up -d --wait

-p는 가져오기 실행 방식의 실행 단계에서 설명하듯 프로젝트 이름을 지정합니다. 빌드가 서비스에 상태 검사를 지정하지 않으므로 --wait는 컨테이너가 실행되는 즉시 반환되고, 서버는 잠시 후에 응답하므로 서버가 거부한 요청은 다시 시도합니다.

테스트하기

published_port가 게시하는 주소인 http://127.0.0.1:8000에서 에이전트에 메시지를 보냅니다. 요청은 사용자와 세션을 지정하며, /run은 첫 메시지에서 세션을 엽니다:

Terminal window
curl -sS -X POST http://127.0.0.1:8000/run -H 'Content-Type: application/json' \
-d '{"app_name": "support_agent", "user_id": "u1", "session_id": "s1", "new_message": {"role": "user", "parts": [{"text": "Where is my order 1234? Answer in one short sentence."}]}}'

Gemini의 응답은 해당 턴이 세션에 추가한 이벤트 목록으로 반환됩니다. 이 실행에서는 키에 자리 표시자를 사용했기 때문에 Gemini가 이를 거부했습니다. 요청은 HTTP 500, Internal Server Error로 응답했으며, 서비스 로그 docker compose -p support-agent -f dist/compose/docker-compose.yaml logs support-agent가 그 이유를 알려 줍니다:

google.genai.errors.ClientError: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'API key not valid. Please pass a valid API key.', 'status': 'INVALID_ARGUMENT', [… omitted: the error's details]}}

curl -sS http://127.0.0.1:8000/list-apps는 서버가 보유한 에이전트인 ["support_agent"]를 반환합니다.

다음 명령으로 스택을 중지합니다:

Terminal window
docker compose -p support-agent -f dist/compose/docker-compose.yaml down

Kubernetes에서

같은 에이전트를 --target helm으로 Kubernetes용으로 가져올 수 있습니다. 클러스터는 레지스트리에서 이미지를 가져오므로, 빌드한 이미지를 클러스터가 읽는 레지스트리에 푸시하고, support_agent/import-answers.yaml에서 답변으로 지정된 이미지 대신 그 이름을 적습니다. 이 실행에서는 클러스터 자체 머신의 레지스트리에 localhost:5000/support-agent:1.0.0으로 푸시했습니다. 그 파일의 두 번째 답변은 에이전트가 Gemini API 키를 읽어 오는 Secret인 google-api-key를 지정합니다. Docker Compose용 초안은 이미 source에 있으므로, 이 초안은 별도의 폴더에 작성하고 그 폴더에서 빌드합니다:

Terminal window
aggrega import support_agent --target helm --output-dir helm
cd helm
aggrega build --release release.yaml

빌드는 작업 공간 루트인 source의 dist/helm/ 아래에 일반 Kubernetes 매니페스트를 작성하며, 이는 helm에서 보면 ../dist/helm/입니다. 적용할 네임스페이스에 Secret google-api-key를 만들어 데이터 키 value 아래에 키를 담고, 가져오기 실행 방식의 실행 단계에서 설명하는 대로 폴더를 적용합니다. 에이전트의 Service는 support-agent-default입니다. 로컬 포트를 이 Service로 포워딩하고 명령을 실행 상태로 둡니다:

Terminal window
kubectl port-forward -n <namespace> svc/support-agent-default 8000:8000

다른 터미널에서 위의 메시지는 변경 없이 같은 주소로 에이전트에 도달합니다. 이 실행에서도 같은 Internal Server Error가 반환되었고, kubectl logs -n <namespace> deploy/support-agent는 자리 표시자 키에 대한 같은 거부를 보여 줍니다.