본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

기존 Konnect 리소스 선언형 관리로 가져오기

원문 보기 위키 갱신

기존 Konnect 리소스 선언형 관리로 가져오기 (kongctl adopt)

kongctl adopt 명령은 kongctl 외부에서 만들어진 기존 Konnect 리소스를 선언형 관리 체계로 편입할 때 사용해요

출처: 문서

본문

kongctl 외부에서 생성된 기존 Konnect 리소스를 선언적 관리 대상으로 가져오고 싶을 때가 있을 거예요. adopt 커맨드를 사용하면 다른 필드는 수정하지 않고 기존 Konnect 리소스에 네임스페이스 레이블을 추가할 수 있어요. 리소스를 adopt하고 나면 구성 세트에 추가해서 앞으로 선언적으로 관리하세요.

예제

이름으로 Dev Portal을 adopt하기:

kongctl adopt portal my-portal --namespace team-alpha

ID로 컨트롤 플레인을 adopt하기:

kongctl adopt control-plane 22cd8a0b-72e7-4212-9099-0764f8e9c5ac \
  --namespace platform

ID로 커스텀 대시보드를 adopt하기:

kongctl adopt analytics dashboard 22cd8a0b-72e7-4212-9099-0764f8e9c5ac \
  --namespace analytics

리소스에 이미 KONGCTL-namespace 레이블이 있으면 커맨드는 변경 없이 실패해요.

하위 커맨드

kongctl은 Kong 리소스를 adopt하기 위한 다음 도구를 제공해요:

kongctl adopt ai-gateway

설명: 기존 Konnect AI Gateway를 네임스페이스 관리로 adopt해요.

kongctl adopt analytics

설명: Konnect Observability 리소스를 adopt해요.

kongctl adopt api

설명: API 리소스를 adopt해요.

kongctl adopt auth-strategy

설명: 인증 전략을 adopt해요.

kongctl adopt control-plane

설명: 컨트롤 플레인 구성을 adopt해요.

kongctl adopt dcr-provider

설명: 기존 Konnect DCR provider를 네임스페이스 관리로 adopt해요.

kongctl adopt event-gateway

설명: 기존 Konnect Event Gateway를 네임스페이스 관리로 adopt해요.

kongctl adopt konnect

설명: Konnect 리소스를 adopt해요.

kongctl adopt organization

설명: 조직 설정을 adopt해요.

kongctl adopt portal

설명: Developer Portal 구성을 adopt해요.

커맨드 사용법

Usage:
  kongctl adopt [flags]
  kongctl adopt [command]

Examples:
  # Adopt a portal by name into the "team-alpha" namespace
  kongctl adopt portal my-portal --namespace team-alpha
  # Move an already adopted portal to a different namespace
  kongctl adopt --namespace platform --overwrite-namespace portal my-portal
  # Adopt a control plane by ID
  kongctl adopt control-plane 22cd8a0b-72e7-4212-9099-0764f8e9c5ac --namespace platform
  # Adopt a dashboard by ID
  kongctl adopt analytics dashboard 22cd8a0b-72e7-4212-9099-0764f8e9c5ac --namespace analytics
  # Adopt a DCR provider by name
  kongctl adopt dcr-provider my-dcr-provider --namespace team-alpha
  # Adopt an AI Gateway by display name
  kongctl adopt ai-gateway my-ai-gateway --namespace team-alpha
  # Adopt an API explicitly via the konnect product
  kongctl adopt konnect api my-api --namespace team-alpha

Available Commands:
  ai-gateway    Adopt an existing Konnect AI Gateway into namespace management
  analytics     Adopt Konnect Analytics resources into namespace management
  api           Adopt an existing Konnect API into namespace management
  auth-strategy Adopt an existing Konnect auth strategy into namespace management
  control-plane Adopt an existing Konnect control plane into namespace management
  dcr-provider  Adopt an existing Konnect DCR provider into namespace management
  event-gateway Adopt an existing Konnect Event Gateway Control Plane into namespace management
  konnect       Manage Konnect resources
  organization  Adopt organization resources into namespace management
  portal        Adopt an existing Konnect portal into namespace management


Flags:
      --base-url string         Base URL for Konnect API requests.
                                - Config path: [ konnect.base-url ]
                                - Default   : [ https://us.api.konghq.com ]
      --color-theme string      Configures the CLI UI/theme (prompt, tables, TUI elements).
                                - Config path: [ color-theme ]
                                - Examples   : [ auto, 3024_day, 3024_night, aardvark_blue, abernathy ]
                                - Reference  : [ https://github.com/lrstanley/bubbletint/blob/master/DEFAULT_TINTS.md ] (default "auto")
      --config-file string      Path to the configuration file to load.
                                - Environment variable: KONGCTL_CONFIG_FILE (overridden by this flag)
                                - Default: [ $XDG_CONFIG_HOME/kongctl/config.yaml ]
  -h, --help                    help for adopt
      --log-file string         Write execution logs to the specified file instead of STDERR.
                                - Config path: [ log-file ]
      --log-level string        Configures the logging level. Execution logs are written to STDERR.
                                - Config path: [ log-level ]
                                - Allowed    : [ trace|debug|info|warn|error ] (default "error")
      --namespace string        Namespace label to apply to the resource (required)
      --no-telemetry            Disable telemetry for this command invocation. Overrides config and env.
                                - Config path: [ telemetry.enabled ]
                                - Env var    : [ KONGCTL_NO_TELEMETRY ]
                                - Default    : [ false ]
      --no-trunc                Preserve full cell widths in static text tables beyond terminal width.
                                Does not change column selection, UUID formatting, or explicit string slices.
                                - Config path: [ text.no-trunc ]
                                - Default    : [ false ]
  -o, --output string           Configures the format of data written to STDOUT.
                                - Config path: [ output ]
                                - Allowed    : [ json|yaml|text ] (default "text")
      --overwrite-namespace     Overwrite an existing namespace label on the resource
      --pat string              Konnect Personal Access Token (PAT) used to authenticate the CLI.
                                Setting this value overrides tokens obtained from the login command.
                                - Config path: [ konnect.pat ]
  -p, --profile string          Specify the profile to use for this command. (default "default")
      --region string           Konnect region identifier (for example "eu"). Used to construct the base URL when --base-url is not provided.
                                - Config path: [ konnect.region ]
      --text-id-format string   Configure UUID rendering in static text-table ID columns.
                                - Config path: [ text.id-format ]
                                - Allowed    : [ compact|full ]
                                - Default    : [ compact ]
      --text-layout string      Configure static text-table column selection.
                                - Config path: [ text.layout ]
                                - Allowed    : [ compact|auto|wide ]
                                - Default    : [ compact ]

Use "kongctl adopt [command] --help" for more information about a command.

관련 리소스

더 알아보기 (Learn more)