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

calicoctl node diags

원문 보기 위키 갱신

이 섹션은 calicoctl node diags 명령을 설명해요.

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

출처: calicoctl node diags

본문

'calicoctl node diags' 명령의 도움말 보기

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

Gather a diagnostics bundle from the Calico node on this host. Run it on the
affected node when troubleshooting a networking problem; it collects logs and
system information useful for diagnosis.

Usage:
  calicoctl node diags [flags]

Examples:
  calicoctl node diags

Flags:
  -h, --help             help for diags
      --log-dir string   The directory containing Calico logs. (default "/var/log/calico")

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

예제

sudo calicoctl node diags

응답 예시는 아래와 같아요.

Collecting diagnostics
Using temp dir: /tmp/calico676127473
Dumping netstat
Dumping routes (IPv4)
Dumping routes (IPv6)
Dumping interface info (IPv4)
Dumping interface info (IPv6)
Dumping iptables (IPv4)
Dumping iptables (IPv6)
Dumping ipsets
exit status 1
Dumping ipsets (container)
Copying journal for calico-node.service
Dumping felix stats
Copying Calico logs

Diags saved to /tmp/calico676127473/diags-20170522_151219.tar.gz
If required, you can upload the diagnostics bundle to a file sharing service
such as transfer.sh using curl or similar.  For example:

    curl --upload-file /tmp/calico676127473/diags-20170522_151219.tar.gz https://transfer.sh//tmp/calico676127473/diags-20170522_151219.tar.gz

옵션

      --log-dir string   The directory containing Calico logs. (default "/var/log/calico")

더 알아보기 (Learn more)

node diags는 문제가 생긴 노드에서 로그·라우팅·iptables 등 진단 번들을 모아 주는 명령이에요. 네트워킹 문제를 트러블슈팅할 때 영향을 받은 노드에서 실행하세요. 생성된 tar.gz 번들은 파일 공유 서비스로 올려서 공유할 수도 있어요.