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

calicoctl ipam check

원문 보기 위키 갱신

이 섹션은 calicoctl ipam check 명령을 설명해요.

calicoctl 명령 전체 목록은 calicoctl 개요를 참고하세요.

출처: calicoctl ipam check

본문

'calicoctl ipam check' 명령의 도움말 보기

calicoctl ipam check --help를 실행하면 다음과 같은 도움말 메뉴가 표시돼요.

Check the integrity of Calico's IPAM data structures and report leaked or
improperly allocated IP addresses. The report it produces can later be passed
to ipam release.

Usage:
  calicoctl ipam check [flags]

Examples:
  # Check IPAM and write a report of problem IPs.
  calicoctl ipam check --show-problem-ips -o report.json

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 check
      --kubeconfig string   Path to Kubeconfig file.
  -o, --output string       Path to output report file.
      --show-all-ips        Print all IPs that are checked.
      --show-problem-ips    Print all IPs that are leaked or not allocated properly.

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")

예제

일관성을 점검하고 누수된 주소를 해제하는 예제 워크플로예요.

데이터스토어 잠그기

calicoctl datastore migrate lock

SECONDARY: 데이터스토어가 잠긴 동안은 데이터스토어가 잠금 해제될 때까지 새 파드를 시작할 수 없어요.

check 명령으로 리포트 생성하기

calicoctl ipam check -o report.json

불필요한 주소 해제하기

calicoctl ipam release --from-report report.json

데이터스토어 잠금 해제하기

calicoctl datastore migrate unlock

더 알아보기 (See also)

더 알아보기 (Learn more)

ipam check는 Calico IPAM 데이터 구조의 무결성을 점검하고 누수되거나 잘못 할당된 IP를 리포트로 남겨줘요. 이 리포트는 ipam release에 그대로 넘길 수 있어요. 점검 전후로 데이터스토어를 잠그고 해제하는 워크플로도 위 예제를 참고하세요.