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

선언형 스키마 조회 명령어

원문 보기 위키 갱신

선언형 스키마 조회 명령어 (kongctl explain)

kongctl explain 명령어는 지원되는 리소스 타입이나 필드의 선언형 스키마를 보여주는 도구예요. 경로 없이 실행하면 사용할 수 있는 모든 선언형 리소스 경로를 나열해 주고, 텍스트 출력으로 사람이 읽기 쉬운 필드 요약을 확인할 수 있어요. JSON이나 YAML 옵션을 쓰면 같은 스키마를 기계가 읽을 수 있는 형태로 받을 수 있어서 자동화에도 활용하기 좋아요. 성숙도가 낮은 리소스에는 성숙도 라벨이 붙고, 라벨이 없는 리소스는 GA 상태라는 점도 기억해 두면 좋아요

출처: 문서

본문

경로.

경로 없이 kongctl explain을 실행하면 사용 가능한 모든 선언형 리소스 경로를 나열해요. 사람이 읽기 쉬운 필드 요약이 필요하면 텍스트 출력을 사용하세요. 동일한 스키마를 기계가 읽을 수 있는 형태로 가져오려면 JSON이나 YAML을 사용하세요.

성숙도가 낮은 리소스와 작업에는 성숙도 라벨이 붙어 있어요. 라벨이 없는 리소스는 GA예요. JSON과 YAML 스키마 출력은 x-kongctl-maturity를 통해 성숙도를 노출해요.

명령 사용법

Usage:
  kongctl explain <resource-path> [flags]

Examples:
  # Explain the declarative API resource
  kongctl explain api
  # Explain a child resource in nested form
  kongctl explain api.versions
  # Explain a specific field
  kongctl explain api.publications.portal_id
  # Explain analytics dashboard tiles and valid discriminator values
  kongctl explain analytics.dashboards --extended
  # Retrieve the machine-readable schema as JSON Schema
  kongctl explain api --output json
  # Retrieve the same schema serialized as YAML
  kongctl explain api --output yaml


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 ]
      --extended                Include extended field details in text output
  -h, --help                    help for explain
      --jq string               Filter JSON responses using jq expressions (powered by gojq for full jq compatibility)
      --jq-color string         Controls colorized output for jq filter results.
                                - Config path: [ jq.color.enabled ]
                                - Allowed    : [ auto|always|never ] (default "auto")
      --jq-color-theme string   Select the color theme used for jq filter results.
                                - Config path: [ jq.color.theme ]
                                - Examples   : [ friendly, github-dark, dracula ]
                                - Reference  : [ https://xyproto.github.io/splash/docs/ ] (default "friendly")
  -r, --jq-raw-output           Output string jq results without JSON quotes (like jq -r).
                                - Config path: [ jq.raw-output ]
      --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 ]
  -o, --output string           Configures the format of data written to STDOUT.
                                - Config path: [ output ]
                                - Allowed    : [ json|yaml|text ] (default "text")
  -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 ]

관련 리소스

더 알아보기 (Learn more)