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

선언형 구성 내보내기

원문 보기 위키 갱신

선언형 구성 내보내기 (kongctl dump declarative)

Konnect에 있는 구성을 선언형 설정으로 내보낼 때 사용하는 kongctl dump declarative 명령을 다루는 문서예요. 선택한 부모 리소스의 하위 리소스까지 함께 담으려면 --include-child-resources를, API 기본값은 생략하면서 명시적인 null이나 기본값이 아닌 값은 그대로 유지하려면 --skip-defaults를 쓰면 돼요. 예를 들어 AI Gateway와 그 자식들을 덤프하려면 --resources ai_gateways처럼 부모를 지정해야 하고, 자식 리소스를 직접 선택하는 방식은 지원하지 않아요. 명령 사용법 섹션에서는 --filter-id, --filter-name 같은 필터링 플래그와 설정 경로, 기본값까지 자세히 확인할 수 있어요

출처: 문서

본문

선택한 부모 리소스 유형의 자식을 포함하려면 --include-child-resources를 사용하세요. 리터럴 API 기본값은 생략하면서 명시적인 null과 기본값이 아닌 값은 유지하려면 --skip-defaults를 사용하세요.

AI Gateway와 그 자식을 덤프하려면 부모를 선택하세요:

kongctl dump declarative \
  --resources ai_gateways \
  --include-child-resources

AI Gateway의 자식을 직접 선택하는 셀렉터는 지원되지 않아요.

명령어 사용법

Usage:
  kongctl dump declarative [flags]


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 ]
      --default-namespace string   Default namespace to include in declarative output (_defaults.kongctl.namespace).
      --filter-id string           Filter resources by ID (exact match).
                                   Mutually exclusive with --filter-name.
      --filter-name string         Filter resources by name. Use '*' wildcards for substring matching (e.g., '*portal*').
                                   Mutually exclusive with --filter-id.
  -h, --help                       help for declarative
      --include-child-resources    Include child resources in the 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 ]
      --output-file string         File to write the output to. If not specified, output is written to stdout.
      --page-size int              Max number of results to include per response page.
                                   - Config path: [ konnect.page-size ] (default 10)
      --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 ]
      --resources string           Comma separated list of resource types to dump (ai_gateways, analytics.dashboards, apis, application_auth_strategies, control_planes, dcr_providers, event_gateways, organization.teams, portals).
      --skip-defaults              Omit fields whose values match defaults declared by the Konnect API.
      --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 ]

관련 리소스

더 알아보기 (Learn more)

  • kongctl dump 명령 전체의 사용법과 하위 명령을 한눈에 살펴볼 수 있어요 — kongctl dump commands