Konnect 리소스 내보내기
Konnect 리소스 내보내기 (kongctl dump)
kongctl dump 명령어는 현재 Konnect 리소스 상태를 다양한 형식으로 내보내는 도구예요. kongctl dump declarative로는 kongctl 선언형 구성을, kongctl dump tf-import로는 Terraform 임포트 블록을 만들 수 있어요. 리소스 지정, 자식 리소스 포함, 네임스페이스 설정, 이름이나 ID로 필터링하는 옵션도 함께 제공해요
출처: 문서
본문
예제
모든 API와 그 하위 리소스를 tf-import 형식으로 내보내요:
kongctl dump tf-import --resources=api --include-child-resources
모든 portal과 api 리소스를 kongctl 선언형 구성과 team-alpha 네임스페이스로 내보내요:
kongctl dump declarative --resources=portal,api --default-namespace=team-alpha
Konnect UI에서 만든 커스텀 대시보드는 먼저 adopt한 다음, 같은 네임스페이스로 덤프하세요:
kongctl adopt analytics dashboard 22cd8a0b-72e7-4212-9099-0764f8e9c5ac \
--namespace analytics
kongctl dump declarative --resources=analytics.dashboards \
--default-namespace=analytics > dashboards.yaml
kongctl plan -f dashboards.yaml --mode apply
하위 명령어
kongctl은 구성을 내보내기 위한 다음 도구들을 제공해요:
kongctl dump declarative
설명: 선언형 구성을 내보내요.
kongctl dump tf-import
설명: Terraform import용으로 내보내요.
명령어 사용법
Usage:
kongctl dump [flags]
kongctl dump [command]
Aliases:
dump, d, D
Examples:
# Export all portals as Terraform import blocks to stdout
kongctl dump tf-import --resources=portal
# Export all portals and their child resources (documents, specifications, pages, settings)
kongctl dump tf-import --resources=portal --include-child-resources
# Export all portals as Terraform import blocks to a file
kongctl dump tf-import --resources=portal --output-file=portals.tf
# Export all APIs with their child resources and include debug logging
kongctl dump tf-import --resources=api --include-child-resources --log-level=debug
# Export declarative configuration with a default namespace
kongctl dump declarative --resources=portal,api --default-namespace=team-alpha
# Export adopted dashboards as declarative configuration
kongctl dump declarative --resources=analytics.dashboards --default-namespace=analytics
# Export all organization teams
kongctl dump declarative --resources=organization.teams
# Filter by name (exact match)
kongctl dump declarative --resources=portal --filter-name=my-dev-portal
# Filter by name (substring match using wildcards)
kongctl dump declarative --resources=portal --filter-name='*dev*'
# Filter by ID
kongctl dump declarative --resources=portal --filter-id=abc12345-def6-7890-abcd-ef1234567890
Available Commands:
declarative Export resources as kongctl declarative configuration
tf-import Export resources as Terraform import blocks
Flags:
--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 dump
--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")
--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 ]
-p, --profile string Specify the profile to use for this command. (default "default")
--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 dump [command] --help" for more information about a command.
관련 리소스
더 알아보기 (Learn more)
- 선언형 구성으로 리소스를 내보내는 하위 명령의 사용법을 알아봐요 — kongctl dump declarative
- Terraform 임포트 블록으로 리소스를 내보내는 방법을 확인해봐요 — kongctl dump tf-import
- kongctl 선언형 구성의 개념과 작성 방법을 살펴봐요 — Declarative configuration with kongctl
- Konnect UI에서 만든 대시보드를 내보내기 전에 먼저 adopt하는 방법을 알아봐요 — adopt
- kongctl 시작 방법을 먼저 익혀봐요 — Get started with kongctl