Belajar Sendiri

Commands

journalctl -u

journalctl -u <service> [-n N] [--no-pager] [-f]

Risk: Safe

What it does

Reads a service's diary: the log lines systemd keeps for it.

When to use it

The kubelet stopped or keeps failing, and you want to know why.

Example

$ journalctl -u kubelet -n 20 --no-pager

The kubelet's last 20 diary lines, printed all at once.

$ journalctl -u kubelet -f

Keep watching for new lines. Ctrl+C stops.