calicoctl datastore migrate-policy-names
calicoctl datastore migrate-policy-names 명령어는 v3.32 이전에 만들어진 정책 이름에서 레거시 "default." 티어 접두사를 제거해요. etcdv3 데이터스토어를 제자리에서 v3.32 이후로 업그레이드한 경우에만 필요한 명령입니다. 이 문서는 명령어의 도움말, 예제, 동작 특성을 소개해요.
출처: 문서
본문
이 섹션은 calicoctl datastore migrate-policy-names 명령어를 설명합니다.
calicoctl 명령어 전체 목록은 calicoctl 개요를 읽어보세요.
참고: 이 명령은 v3.32 이전에 만들어졌고 제자리에서 업그레이드된 etcdv3 데이터스토어(예: OpenStack)에서만 필요해요. Kubernetes 데이터스토어는 kube-controllers가 자동으로 마이그레이션하므로 그쪽에서는 수동 절차가 필요 없습니다.
'calicoctl datastore migrate-policy-names' 명령어 도움말 표시하기
calicoctl datastore migrate-policy-names --help를 실행하면 명령어의 다음 도움말 메뉴가 표시돼요.
Rewrite pre-v3.32 policy names in an etcdv3 datastore to drop the legacy
"default." tier prefix. Run this once when upgrading an etcdv3-backed cluster
past v3.32 so existing policy names match the current naming scheme.
Usage:
calicoctl datastore migrate-policy-names [flags]
Examples:
calicoctl datastore migrate-policy-names
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 migrate-policy-names
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")
예제
데이터스토어 안의 v3.32 이전 정책 이름을 v3 이름에 맞도록 재작성합니다.
calicoctl datastore migrate-policy-names
완료되면 명령이 몇 개의 정책을 재작성했는지 보고해요.
Policy name migration complete, migrated 5 policies.
이 명령은 멱등(idempotent)해요. 모든 정책이 이미 마이그레이션된 상태에서 다시 실행하면 migrated 0 policies를 보고하고 아무 변경도 하지 않습니다.
일반 옵션
-c, --config string Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
함께 보기
- calicoctl 설치
- 이 명령을 실행하는 전체 업그레이드 절차는 OpenStack에서 Calico 업그레이드
더 알아보기 (Learn more)
이 명령은 etcdv3 데이터스토어 전용이고 멱등해서 여러 번 실행해도 안전해요. OpenStack 기반 클러스터를 v3.32 이후로 올릴 때 전체 업그레이드 절차 안에서 한 번 실행하세요.