This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.1.2. Manually gathering logs with SSH access to your host(s)
Manually gather logs in situations where must-gather or automated collection methods do not work.
Prerequisites
- You must have SSH access to your host(s).
Procedure
Collect the
bootkube.serviceservice logs from the bootstrap host using thejournalctlcommand by running:journalctl -b -f -u bootkube.service
$ journalctl -b -f -u bootkube.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the bootstrap host’s container logs using the Podman logs. This is shown as a loop to get all of the container logs from the host:
for pod in $(sudo podman ps -a -q); do sudo podman logs $pod; done
$ for pod in $(sudo podman ps -a -q); do sudo podman logs $pod; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, collect the host’s container logs using the
tailcommand by running:tail -f /var/lib/containers/storage/overlay-containers/*/userdata/ctr.log
# tail -f /var/lib/containers/storage/overlay-containers/*/userdata/ctr.logCopy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the
kubelet.serviceandcrio.serviceservice logs from the master and worker hosts using thejournalctlcommand by running:journalctl -b -f -u kubelet.service -u crio.service
$ journalctl -b -f -u kubelet.service -u crio.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the master and worker host container logs using the
tailcommand by running:sudo tail -f /var/log/containers/*
$ sudo tail -f /var/log/containers/*Copy to Clipboard Copied! Toggle word wrap Toggle overflow