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.service
service logs from the bootstrap host using thejournalctl
command by running:journalctl -b -f -u bootkube.service
$ journalctl -b -f -u bootkube.service
Copy 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; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, collect the host’s container logs using the
tail
command by running:tail -f /var/lib/containers/storage/overlay-containers/*/userdata/ctr.log
# tail -f /var/lib/containers/storage/overlay-containers/*/userdata/ctr.log
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the
kubelet.service
andcrio.service
service logs from the master and worker hosts using thejournalctl
command by running:journalctl -b -f -u kubelet.service -u crio.service
$ journalctl -b -f -u kubelet.service -u crio.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Collect the master and worker host container logs using the
tail
command by running:sudo tail -f /var/log/containers/*
$ sudo tail -f /var/log/containers/*
Copy to Clipboard Copied! Toggle word wrap Toggle overflow