OpenShift OC SOS Plugin
openshift-sos-pluginis an This page is not included, but the link has been rewritten to point to the nearest parent document.ocplugin written to aid with gather information (status, logging, configuration, etc) from your OpenShift cluster.
NOTE: OpenShift CLI Plugins were added in v3.7 so make sure your oc binary version is up-to-date.
ADDITIONAL NOTE: The OpenShfit SOS Plugin utilizes a bash script. Make sure you are running from a bash interpreter before executing!
Installation
-
Clone repository into your
~/.kube/pluginsdirectory:# git clone https://github.com/bostrt/openshift-sos-plugin ~/.kube/plugins/openshift-sos-plugin
a. If you receive the error Server aborted the SSL handshake during clone process, you can download it manually from https://github.com/bostrt/openshift-sos-plugin/archive/master.zip and unzip it into your plugins directory using:
```
# mkdir -p ~/.kube/plugins
# unzip master.zip -d ~/.kube/plugins
```
-
Ensure the plugin is available by running:
# oc plugin ... Available Commands: sos Plugin for gathering various types of data from OpenShift. -
Finally, run the plugin:
# oc plugin sos -n testing Data capture complete and archived in /tmp/oc-sos-testing-2018-01-25.tar.xz
Usage
After installation, you can run the plugin using the oc command. The prequisite is that you are logged into a cluster via the oc command.
-
Default behavior is to use your current namespace/project active in
oc:# oc plugin sos Data capture complete and archived in /tmp/oc-sos-testing-2018-01-25.tar.xz -
You can also specify another namespace/project using the standard OpenShift
-nflag:# oc plugin sos -n testing Data capture complete and archived in /tmp/oc-sos-testing-2018-01-25.tar.xz -
If you want to change the output format, use the standard
-oflag. JSON output is default:# oc plugin sos -n testing -o yaml Data capture complete and archived in /tmp/oc-sos-testing-2018-01-25.tar.xz