$ oc adm must-gather
If you need to inspect your OpenShift 4 cluster to debug an issue, you can make use of the must-gather
tool. It is part of the oc
CLI tool that OpenShift includes, so you are not required to install anything else to use it. Basic usage is:
$ oc adm must-gather
The command above creates a directory and dumps all cluster information on it. Run oc adm must-gather -h
to see all available options.
However, it does not get Service Mesh data. To dump those as well, you need to run oc adm must-gather
a second time, supplying an additional command line flag as exemplified below. If you are only interested in Service Mesh data, you can skip the command above and just run the following command:
$ oc adm must-gather --image=docker.io/maistra/istio-must-gather:1.1.0
By using the Maistra image as specified above, you will get all the Service Mesh data (deployments, configMaps, virtual services, gateways, etc) dumped so that you can investigate any issue in your cluster.
For more information about the output directory structure, or how must-gather
works and what are its command line options, you can visit their docs.