Troubleshooting Tools
Essential tools
kubectl: for interacting with kubernetes cluster, e.g.kubectl describe pod <pod-name>journalctl:for viewing logs, e.g.journalctl -u kubelet -liptablesandebtables:for debugging service problems, e.g.iptables -t nat -nLchecks whether kube-proxy's iptables rules are expectedtcpdump:for debugging network problems, e.g.tcpdump -nn host 10.240.0.8perf: for debugging performance issues, e.g. troubleshooting issues like Container Isolation Gone Wrong
sysdig
sysdig is a container troubleshooting tools, which provides both opensource and commercial products. For regular troubleshooting, I believe opensourced version is enough.
On top of sysdig, you can also use csysdig and sysdig-inspect as command line interface and GUI.
Setup
# on Ubuntu
curl -s https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public | apt-key add -
curl -s -o /etc/apt/sources.list.d/draios.list http://download.draios.com/stable/deb/draios.list
apt-get update
apt-get -y install linux-headers-$(uname -r)
apt-get -y install sysdig
# on REHL
rpm --import https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public
curl -s -o /etc/yum.repos.d/draios.repo http://download.draios.com/stable/rpm/draios.repo
rpm -i http://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpm
yum -y install kernel-devel-$(uname -r)
yum -y install sysdig
# on MacOS
brew install sysdigExamples
More usages could be found at Sysdig User Guide.
Weave Scope
Weave Scope is another container monitoring and troubleshooting tool. Compared to sysdig, it provides a simple GUI which describes the entire topology of the cluster.
Weave Scope consists of two components: the app and the probe. The components are deployed as a single Docker container using the scope script. The probe is responsible for gathering information about the host on which it is running. This information is sent to the app in the form of a report. The app processes reports from the probe into usable topologies, serving the UI, as well as pushing these topologies to the UI.
Setup
Access GUI
Known Issues
When running scope on Ubuntu kernel 4.4.0 with option --probe.ebpf.connections (default is enabled), Node may panic because of a kernel issue:
To fix this issue, you could either
Disable eBPF connections, e.g.
--probe.ebpf.connections=falseOr, upgrade kernel to 4.13.0
Last updated
Was this helpful?