Chapter 2. Troubleshooting a cluster
To begin troubleshooting a MicroShift cluster, first access the cluster status.
2.1. Checking the status of a cluster Copy linkLink copied to clipboard!
You can check the status of a MicroShift cluster or see active pods. Given in the following procedure are three different commands you can use to check cluster status. You can choose to run one, two, or all commands to help you get the information you need to troubleshoot the cluster.
Procedure
Check the system status, which returns the cluster status, by running the following command:
sudo systemctl status microshift
$ sudo systemctl status microshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If MicroShift fails to start, this command returns the logs from the previous run.
Example healthy output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Get comprehensive logs by running the following command:
sudo journalctl -u microshift
$ sudo journalctl -u microshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe default configuration of the
systemd
journal service stores data in a volatile directory. To persist system logs across system starts and restarts, enable log persistence and set limits on the maximum journal data size.Optional: If MicroShift is running, check the status of active pods by entering the following command:
oc get pods -A
$ oc get pods -A
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis example output shows basic MicroShift. If you have installed optional RPMs, the status of pods running those services is also expected to be shown in your output.