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

calicoctl cluster diags

원문 보기 위키 갱신

이 문서는 calicoctl cluster diags 명령어를 설명해요. calicoctl 명령어 전체 목록은 calicoctl 개요를 참고하세요. 이 명령어는 클러스터에 접근할 수 있는 어느 위치에서든(예: kubeconfig가 있는 곳이라면 어디든) 실행할 수 있어요. 단일 호스트에서 실행하는 node diags와 달리 클러스터 전반의 진단 정보와 로그를 모아 진단 번들로 만들어 줘요.

출처: 문서

본문

'calicoctl cluster diags' 명령어 도움말 텍스트 표시하기

calicoctl cluster diags --help를 실행하면 이 명령어의 도움말 메뉴가 다음과 같이 표시돼요.

Collect a snapshot of cluster-wide Calico diagnostics and logs. Unlike node
diags, which runs on a single host, this gathers information across the
cluster.

Usage:
  calicoctl cluster diags [flags]

Examples:
  calicoctl cluster diags

Flags:
  -c, --config string           Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
      --focus-nodes string      Comma-separated list of nodes from which to try first to collect logs.
  -h, --help                    help for diags
      --max-logs int            Only collect up to this number of logs, for each kind of Calico component. (default 5)
      --max-parallelism int     Maximum number of parallel threads to use for collecting logs. (default 10)
      --since string            Only collect logs newer than provided relative duration (e.g. 30m, 2h).
      --skip-temp-dir-cleanup   Don't clean up the temporary directory.

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 cluster diags
calicoctl cluster diags --since=1h
calicoctl cluster diags --focus-nodes=infra1,control2 --max-logs=2

응답 예시는 다음과 같아요.

==== Begin collecting diagnostics. ====
Collecting kubernetes version...
Collect kubernetes Client and Server version
Collecting Calico resources...
Collect Calico clusterinformations
Collect Calico clusterinformations
Collect Calico felixconfigurations
Collect Calico felixconfigurations
Collect Calico bgppeers
Collect Calico bgppeers
Collect Calico bgpconfigurations
Collect Calico bgpconfigurations
Collect Calico ipamblocks
Collect Calico ipamblocks
Collect Calico blockaffinities
Collect Calico blockaffinities
Collect Calico ipamhandles
Collect Calico ipamhandles
Collect Calico tiers
Collect Calico tiers
Collect Calico networkpolicies
Collect Calico networkpolicies
Collect Calico clusterinformations
Collect Calico clusterinformations
Collect Calico hostendpoints
Collect Calico hostendpoints
Collect Calico ippools
Collect Calico ippools
Collect Calico licensekeys
Collect Calico licensekeys
Collect Calico networksets
Collect Calico networksets
Collect Calico globalnetworksets
Collect Calico globalnetworksets
Collect Calico globalnetworkpolicies
Collect Calico globalnetworkpolicies
Collecting Tigera Operator details ...
Collect tigerastatuses
Collect tigerastatuses
Collect installations
Collect installations
Collect apiservers
Collect apiservers
Collect compliances
Collect compliances
Collect intrusiondetections
Collect intrusiondetections
Collect managers
Collect managers
Collect logcollectors
Collect logcollectors
Collect logstorages
Collect logstorages
Collect managementclusterconnections
Collect managementclusterconnections
Collecting core kubernetes resources...
Collect nodes
Collect nodes
Collect pods
Collect pods
Collect deployments
Collect deployments
Collect daemonsets
Collect daemonsets
Collect services
Collect services
Collect endpoints
Collect endpoints
Collect configmaps
Collect configmaps
Collect persistent volume claim
Collect persistent volume claim
Collect persistent volume
Collect persistent volume
Collect storage class
Collect storage class
Collect all namespaces
Collect all namespaces
Collecting detailed diags for namespace calico-cloud...
Collecting detailed diags for pod calico-cloud-controller-manager-594bb58687-dn86k in namespace calico-cloud on node ip-172-16-101-83.us-west-2.compute.internal...
Collecting diags for pod: calico-cloud-controller-manager-594bb58687-dn86k
Collect logs for pod calico-cloud-controller-manager-594bb58687-dn86k
Collect describe for pod calico-cloud-controller-manager-594bb58687-dn86k
Collecting detailed diags for namespace calico-system...
Collecting detailed diags for pod calico-node-tz6w9 in namespace calico-system on node ip-172-16-101-171.us-west-2.compute.internal...
Collecting diags for pod: calico-node-tz6w9
Collect logs for pod calico-node-tz6w9
Collect describe for pod calico-node-tz6w9
Collecting diags for calico-node: calico-node-tz6w9
Collect iptables for node calico-node-tz6w9
Collect ip routes for node calico-node-tz6w9
Collect ipv6 routes for node calico-node-tz6w9
Collect ip rule for node calico-node-tz6w9
Collect ip route show table all for node calico-node-tz6w9
Collect ip addr for node calico-node-tz6w9
Collect ip link for node calico-node-tz6w9
Collect ip neigh for node calico-node-tz6w9
Collect ipset list for node calico-node-tz6w9
Collect eBPF conntrack for node calico-node-tz6w9
Collect eBPF ipsets for node calico-node-tz6w9
Collect eBPF nat for node calico-node-tz6w9
Collect eBPF routes for node calico-node-tz6w9
Collect eBPF prog for node calico-node-tz6w9
Collect eBPF map for node calico-node-tz6w9
Collect tc qdisc for node calico-node-tz6w9
Collect eBPF map id 16 dumps for node calico-node-tz6w9
Collect eBPF map id 17 dumps for node calico-node-tz6w9
Collect eBPF map id 18 dumps for node calico-node-tz6w9
Collect eBPF map id 19 dumps for node calico-node-tz6w9
Collect eBPF map id 20 dumps for node calico-node-tz6w9
Collect eBPF map id 22 dumps for node calico-node-tz6w9
Collect eBPF map id 23 dumps for node calico-node-tz6w9
Collect eBPF map id 24 dumps for node calico-node-tz6w9
Collect eBPF map id 25 dumps for node calico-node-tz6w9
Collect eBPF map id 26 dumps for node calico-node-tz6w9
Collect eBPF map id 27 dumps for node calico-node-tz6w9
Collect eBPF map id 28 dumps for node calico-node-tz6w9
Collect eBPF map id 29 dumps for node calico-node-tz6w9
Collect eBPF map id 30 dumps for node calico-node-tz6w9
Collect eBPF map id 41 dumps for node calico-node-tz6w9
Collect eBPF map id 46 dumps for node calico-node-tz6w9
Collect CNI log @400000006316fe6f28fbff2c.u for the node calico-node-tz6w9
Collect CNI log @4000000063184f691b61d1ac.u for the node calico-node-tz6w9
Collect CNI log @400000006321838524b6cbcc.u for the node calico-node-tz6w9
Collect CNI log @400000006333d3853a9c824c.u for the node calico-node-tz6w9
Collect CNI log @40000000634675eb2a11c874.u for the node calico-node-tz6w9
Collect CNI log cni.log for the node calico-node-tz6w9
Collect CNI log config for the node calico-node-tz6w9
Collect CNI log current for the node calico-node-tz6w9
Collect CNI log lock for the node calico-node-tz6w9
Collecting detailed diags for pod calico-node-tqdjj in namespace calico-system on node ip-172-16-101-210.us-west-2.compute.internal...
Collecting diags for pod: calico-node-tqdjj
Collect logs for pod calico-node-tqdjj
Collect describe for pod calico-node-tqdjj
Collecting diags for calico-node: calico-node-tqdjj
Collect iptables for node calico-node-tqdjj
Collect ip routes for node calico-node-tqdjj
Collect ipv6 routes for node calico-node-tqdjj
Collect ip rule for node calico-node-tqdjj
Collect ip route show table all for node calico-node-tqdjj
Collect ip addr for node calico-node-tqdjj
Collect ip link for node calico-node-tqdjj
Collect ip neigh for node calico-node-tqdjj
Collect ipset list for node calico-node-tqdjj
Collect eBPF conntrack for node calico-node-tqdjj
Collect eBPF ipsets for node calico-node-tqdjj
Collect eBPF nat for node calico-node-tqdjj
Collect eBPF routes for node calico-node-tqdjj
Collect eBPF prog for node calico-node-tqdjj
Collect eBPF map for node calico-node-tqdjj
Collect tc qdisc for node calico-node-tqdjj
Collect eBPF map id 15 dumps for node calico-node-tqdjj
Collect eBPF map id 16 dumps for node calico-node-tqdjj
Collect eBPF map id 17 dumps for node calico-node-tqdjj
Collect eBPF map id 18 dumps for node calico-node-tqdjj
Collect eBPF map id 19 dumps for node calico-node-tqdjj
Collect eBPF map id 21 dumps for node calico-node-tqdjj
Collect eBPF map id 22 dumps for node calico-node-tqdjj
Collect eBPF map id 23 dumps for node calico-node-tqdjj
Collect eBPF map id 24 dumps for node calico-node-tqdjj
Collect eBPF map id 25 dumps for node calico-node-tqdjj
Collect eBPF map id 26 dumps for node calico-node-tqdjj
Collect eBPF map id 27 dumps for node calico-node-tqdjj
Collect eBPF map id 28 dumps for node calico-node-tqdjj
Collect eBPF map id 29 dumps for node calico-node-tqdjj
Collect eBPF map id 34 dumps for node calico-node-tqdjj
Collect eBPF map id 39 dumps for node calico-node-tqdjj
Collect CNI log @4000000063201beb19d77c74.u for the node calico-node-tqdjj
Collect CNI log @400000006321838436856b9c.u for the node calico-node-tqdjj
Collect CNI log @400000006322d03b119c4724.u for the node calico-node-tqdjj
Collect CNI log @400000006333d383173b8c44.u for the node calico-node-tqdjj
Collect CNI log @40000000634675f5134a8f7c.u for the node calico-node-tqdjj
Collect CNI log cni.log for the node calico-node-tqdjj
Collect CNI log config for the node calico-node-tqdjj
Collect CNI log current for the node calico-node-tqdjj
Collect CNI log lock for the node calico-node-tqdjj
Collecting detailed diags for pod calico-node-4vp2g in namespace calico-system on node ip-172-16-101-83.us-west-2.compute.internal...
Collecting diags for pod: calico-node-4vp2g
Collect logs for pod calico-node-4vp2g
Collect describe for pod calico-node-4vp2g
Collecting diags for calico-node: calico-node-4vp2g
Collect iptables for node calico-node-4vp2g
Collect ip routes for node calico-node-4vp2g
Collect ipv6 routes for node calico-node-4vp2g
Collect ip rule for node calico-node-4vp2g
Collect ip route show table all for node calico-node-4vp2g
Collect ip addr for node calico-node-4vp2g
Collect ip link for node calico-node-4vp2g
Collect ip neigh for node calico-node-4vp2g
Collect ipset list for node calico-node-4vp2g
Collect eBPF conntrack for node calico-node-4vp2g
Collect eBPF ipsets for node calico-node-4vp2g
Collect eBPF nat for node calico-node-4vp2g
Collect eBPF routes for node calico-node-4vp2g
Collect eBPF prog for node calico-node-4vp2g
Collect eBPF map for node calico-node-4vp2g
Collect tc qdisc for node calico-node-4vp2g
Collect eBPF map id 15 dumps for node calico-node-4vp2g
Collect eBPF map id 16 dumps for node calico-node-4vp2g
Collect eBPF map id 17 dumps for node calico-node-4vp2g
Collect eBPF map id 18 dumps for node calico-node-4vp2g
Collect eBPF map id 19 dumps for node calico-node-4vp2g
Collect eBPF map id 21 dumps for node calico-node-4vp2g
Collect eBPF map id 22 dumps for node calico-node-4vp2g
Collect eBPF map id 23 dumps for node calico-node-4vp2g
Collect eBPF map id 24 dumps for node calico-node-4vp2g
Collect eBPF map id 25 dumps for node calico-node-4vp2g
Collect eBPF map id 26 dumps for node calico-node-4vp2g
Collect eBPF map id 27 dumps for node calico-node-4vp2g
Collect eBPF map id 28 dumps for node calico-node-4vp2g
Collect eBPF map id 29 dumps for node calico-node-4vp2g
Collect eBPF map id 36 dumps for node calico-node-4vp2g
Collect eBPF map id 43 dumps for node calico-node-4vp2g
Collect CNI log @4000000063184f4a15365dd4.u for the node calico-node-4vp2g
Collect CNI log @4000000063201c162df1601c.u for the node calico-node-4vp2g
Collect CNI log @40000000632183870cf442e4.u for the node calico-node-4vp2g
Collect CNI log @400000006333d36d010a8c54.u for the node calico-node-4vp2g
Collect CNI log @40000000634675f20f8bf524.u for the node calico-node-4vp2g
Collect CNI log cni.log for the node calico-node-4vp2g
Collect CNI log config for the node calico-node-4vp2g
Collect CNI log current for the node calico-node-4vp2g
Collect CNI log lock for the node calico-node-4vp2g
Collecting detailed diags for pod runtime-reporter-csztr in namespace calico-system on node ip-172-16-101-171.us-west-2.compute.internal...
Collecting diags for pod: runtime-reporter-csztr
Collect logs for pod runtime-reporter-csztr
Collect describe for pod runtime-reporter-csztr
Collecting detailed diags for pod runtime-reporter-9bmj8 in namespace calico-system on node ip-172-16-101-210.us-west-2.compute.internal...
Collecting diags for pod: runtime-reporter-9bmj8
Collect logs for pod runtime-reporter-9bmj8
Collect describe for pod runtime-reporter-9bmj8
Collecting detailed diags for pod runtime-reporter-4jwjq in namespace calico-system on node ip-172-16-101-83.us-west-2.compute.internal...
Collecting diags for pod: runtime-reporter-4jwjq
Collect logs for pod runtime-reporter-4jwjq
Collect describe for pod runtime-reporter-4jwjq
Collecting detailed diags for pod calico-kube-controllers-667d5b588c-hkwnc in namespace calico-system on node ip-172-16-101-171.us-west-2.compute.internal...
Collecting diags for pod: calico-kube-controllers-667d5b588c-hkwnc
Collect logs for pod calico-kube-controllers-667d5b588c-hkwnc
Collect describe for pod calico-kube-controllers-667d5b588c-hkwnc
Collecting detailed diags for pod calico-typha-6494b5f6cc-xjv2h in namespace calico-system on node ip-172-16-101-171.us-west-2.compute.internal...
Collecting diags for pod: calico-typha-6494b5f6cc-xjv2h
Collect logs for pod calico-typha-6494b5f6cc-xjv2h
Collect describe for pod calico-typha-6494b5f6cc-xjv2h
Collecting detailed diags for pod calico-typha-6494b5f6cc-5d26c in namespace calico-system on node ip-172-16-101-83.us-west-2.compute.internal...
Collecting diags for pod: calico-typha-6494b5f6cc-5d26c
Collect logs for pod calico-typha-6494b5f6cc-5d26c
Collect describe for pod calico-typha-6494b5f6cc-5d26c
Collecting detailed diags for namespace tigera-access...
Collecting detailed diags for namespace tigera-dex...
Collecting detailed diags for namespace tigera-elasticsearch...
Collecting detailed diags for namespace tigera-fluentd...
Collecting detailed diags for pod fluentd-node-dncwx in namespace tigera-fluentd on node ip-172-16-101-171.us-west-2.compute.internal...
Collecting diags for pod: fluentd-node-dncwx
Collect logs for pod fluentd-node-dncwx
Collect describe for pod fluentd-node-dncwx
Collecting detailed diags for pod fluentd-node-cgtk9 in namespace tigera-fluentd on node ip-172-16-101-210.us-west-2.compute.internal...
Collecting diags for pod: fluentd-node-cgtk9
Collect logs for pod fluentd-node-cgtk9
Collect describe for pod fluentd-node-cgtk9
Collecting detailed diags for pod fluentd-node-lht88 in namespace tigera-fluentd on node ip-172-16-101-83.us-west-2.compute.internal...
Collecting diags for pod: fluentd-node-lht88
Collect logs for pod fluentd-node-lht88
Collect describe for pod fluentd-node-lht88
Collecting detailed diags for namespace tigera-guardian...
Collecting detailed diags for pod tigera-guardian-b97bf7d57-blqsn in namespace tigera-guardian on node ip-172-16-101-171.us-west-2.compute.internal...
Collecting diags for pod: tigera-guardian-b97bf7d57-blqsn
Collect logs for pod tigera-guardian-b97bf7d57-blqsn
Collect describe for pod tigera-guardian-b97bf7d57-blqsn
Collecting detailed diags for namespace tigera-image-assurance...
Collecting detailed diags for namespace tigera-license...
Collecting detailed diags for namespace tigera-manager...
Collecting detailed diags for namespace tigera-operator...
Collecting detailed diags for pod tigera-operator-5774454fc5-mjrx8 in namespace tigera-operator on node ip-172-16-101-83.us-west-2.compute.internal...
Collecting diags for pod: tigera-operator-5774454fc5-mjrx8
Collect logs for pod tigera-operator-5774454fc5-mjrx8
Collect describe for pod tigera-operator-5774454fc5-mjrx8
Collecting detailed diags for namespace tigera-packetcapture...
Collecting detailed diags for pod tigera-packetcapture-758ff8c7db-slmd7 in namespace tigera-packetcapture on node ip-172-16-101-83.us-west-2.compute.internal...
Collecting diags for pod: tigera-packetcapture-758ff8c7db-slmd7
Collect logs for pod tigera-packetcapture-758ff8c7db-slmd7
Collect describe for pod tigera-packetcapture-758ff8c7db-slmd7
Collecting detailed diags for namespace tigera-prometheus...
Collecting detailed diags for pod calico-prometheus-operator-78d9b7f47c-q2d9v in namespace tigera-prometheus on node ip-172-16-101-171.us-west-2.compute.internal...
Collecting diags for pod: calico-prometheus-operator-78d9b7f47c-q2d9v
Collect logs for pod calico-prometheus-operator-78d9b7f47c-q2d9v
Collect describe for pod calico-prometheus-operator-78d9b7f47c-q2d9v
Collecting detailed diags for namespace tigera-skraper...
Collecting detailed diags for namespace tigera-system...
Collecting detailed diags for pod tigera-apiserver-6f5ddf5697-6qfgj in namespace tigera-system on node ip-172-16-101-171.us-west-2.compute.internal...
Collecting diags for pod: tigera-apiserver-6f5ddf5697-6qfgj
Collect logs for pod tigera-apiserver-6f5ddf5697-6qfgj
Collect describe for pod tigera-apiserver-6f5ddf5697-6qfgj
Collecting detailed diags for pod tigera-apiserver-6f5ddf5697-x69r7 in namespace tigera-system on node ip-172-16-101-83.us-west-2.compute.internal...
Collecting diags for pod: tigera-apiserver-6f5ddf5697-x69r7
Collect logs for pod tigera-apiserver-6f5ddf5697-x69r7
Collect describe for pod tigera-apiserver-6f5ddf5697-x69r7

==== Producing a diagnostics bundle. ====
Diagnostic bundle available at ./calico-diagnostics.tar.gz

옵션

      --since string    Only collect logs newer than provided relative duration (e.g. 30m, 2h).
  -c, --config string   Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")

더 알아보기 (Learn more)

cluster diags는 클러스터 전체의 Calico 리소스, 오퍼레이터 상태, 노드별 네트워크 상태까지 한 번에 수집해요. 문제가 의심될 때 이 명령 하나로 진단 번들(calico-diagnostics.tar.gz)을 만들어 두면 지원 요청이 훨씬 수월해요. --since와 --focus-nodes 옵션으로 수집 범위를 좁힐 수 있다는 점도 기억하세요.