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

calicoctl datastore migrate export

원문 보기 위키 갱신

calicoctl datastore migrate export 명령어는 etcdv3 데이터스토어의 내용을 YAML로 내보내요. Kubernetes 데이터스토어로 마이그레이션하는 첫 단계로, 출력을 datastore migrate import에 넘기게 됩니다. 이 문서는 명령어의 도움말, 내보내지는 리소스 목록, 예제를 소개해요.

출처: 문서

본문

이 문서는 calicoctl datastore migrate export 명령어를 설명합니다.

calicoctl 명령어 전체 목록은 calicoctl 개요를 읽어보세요.

'calicoctl datastore migrate export' 명령어 도움말 표시하기

calicoctl datastore migrate export --help를 실행하면 명령어의 다음 도움말 메뉴가 표시돼요.

Export the contents of an etcdv3 datastore to YAML. This is the first step in
migrating to a Kubernetes datastore; feed the output into datastore migrate
import.

Usage:
  calicoctl datastore migrate export [flags]

Examples:
  calicoctl datastore migrate export > datastore.yaml

Flags:
  -c, --config string   Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
  -h, --help            help for export

Global Flags:
      --allow-version-mismatch   Allow client and cluster versions mismatch
      --context string           The name of the kubeconfig context to use
  -l, --log-level string         Set the log level (panic, fatal, error, warn, info, debug) (default "panic")

내보내지는 리소스

export 하위 커맨드는 다음 Calico 리소스들을 내보내요:

  • IPPools
  • BGPPeers
  • GlobalNetworkPolicies
  • GlobalNetworkSets
  • HostEndpoints
  • KubeControllersConfigurations
  • NetworkPolicies
  • Networksets
  • Nodes
  • BGPConfigurations
  • FelixConfigurations
  • IPReservations
  • BGPFilters

export 하위 커맨드는 다음 리소스들을 내보내지 않아요. 이 리소스들은 생성되어야 하기 때문입니다:

  • WorkloadEndpoints
  • Profiles

예제

etcdv3 데이터스토어의 내용을 etcd-migration이라는 파일로 내보냅니다.

calicoctl datastore migrate export > etcd-migration

일반 옵션

-c, --config string   Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")

함께 보기

더 알아보기 (Learn more)

export는 etcdv3에서 Kubernetes 데이터스토어로 이전하는 첫 단계예요. 내보낸 파일을 datastore migrate import로 넘기면 마이그레이션이 진행됩니다. WorkloadEndpoints와 Profiles는 자동 생성되므로 제외된다는 점을 기억하세요.