https://github.com/bostrt/openshift-sos-plugin
OpenShift v3 oc client plugin for capturing application data.
https://github.com/bostrt/openshift-sos-plugin
Last synced: over 1 year ago
JSON representation
OpenShift v3 oc client plugin for capturing application data.
- Host: GitHub
- URL: https://github.com/bostrt/openshift-sos-plugin
- Owner: bostrt
- License: apache-2.0
- Created: 2018-01-25T14:46:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T04:29:39.000Z (over 7 years ago)
- Last Synced: 2025-02-25T01:51:12.192Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 10
- Watchers: 4
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenShift SOS Plugin
`openshift-sos-plugin` is an [`oc`](https://docs.openshift.org/latest/cli_reference/index.html) plugin 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.
*NOTE*: The OpenShfit SOS Plugin utilizes a bash script. Make sure you are running from a bash interpreter before executing!
# Installation
1. Clone repository into your `~/.kube/plugins` directory:
```
# git clone https://github.com/bostrt/openshift-sos-plugin ~/.kube/plugins/openshift-sos-plugin
```
2. Ensure the plugin is available by running:
```
# oc plugin
...
Available Commands:
sos Plugin for gathering various types of data from OpenShift.
```
3. 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 `-n` flag:
```
# 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 `-o` flag. 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
```