Skip to main content
Calico Enterprise 3.19 (latest) documentation

calicoctl cluster diags

This section describes the calicoctl cluster diags command.

Read the calicoctl Overview for a full list of calicoctl commands.

Note, this command can be run from any location that has access to the cluster (e.g. anywhere with kubeconfig).

Displaying the help text for 'calicoctl cluster diags' command​

Run calicoctl cluster diags --help to display the following help menu for the command.

Usage:
calicoctl cluster diags [options]

Options:
-h --help Show this screen.
--since=<SINCE> Only collect logs newer than provided relative
duration, in seconds (s), minutes (m) or hours (h).
--max-logs=<MAXLOGS> Only collect up to this number of logs, for each
kind of Calico component. [default: 5]
--focus-nodes=<NODES> Comma-separated list of nodes from which we should
try first to collect logs.
-c --config=<CONFIG> Path to connection configuration file.
[default: /etc/calico/calicoctl.cfg]

Description:
The cluster diags command collects a snapshot of diagnostic info and logs related
to Calico for the given cluster. It generates a .tar.gz file containing all the
diags.

By default, to keep the .tar.gz file to a reasonable size, this command
only collects up to 5 sets of logs for each kind of Calico pod (for example,
for calico-node, or Typha, or the intrusion detection controller). To collect
more (or fewer) sets of logs, use the --max-logs option.

To tell calicoctl to try to collect logs first from particular nodes of interest,
set the --focus-nodes option to the relevant node names, comma-separated. For a
Calico component with pods on multiple nodes, calicoctl will first collect logs
from the pods (if any) on the focus nodes, then from other nodes in the cluster.

To collect logs only for the last few hours, minutes, or seconds, set the --since
option to indicate the desired period.

Examples​

calicoctl cluster diags
calicoctl cluster diags --since=1h
calicoctl cluster diags --focus-nodes=infra1,control2 --max-logs=2

An example response follows.

==== 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

Options​

  --since=<SINCE>      Only collect logs newer than provided relative duration,
in seconds (s), minutes (m) or hours (h)
-c --config=<CONFIG> Path to the file containing connection configuration in
YAML or JSON format.
[default: /etc/calico/calicoctl.cfg]