|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * support/gathering-cluster-data.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: REFERENCE |
| 6 | +[id="must-gather-flags_{context}"] |
| 7 | += Must-gather flags |
| 8 | + |
| 9 | +The flags listed in the following table are available to use with the `oc adm must-gather` command. |
| 10 | + |
| 11 | +.{product-title} flags for `oc adm must-gather` |
| 12 | +[cols="1,1,3",options="header"] |
| 13 | +|==== |
| 14 | +|Flag |Example command |Description |
| 15 | + |
| 16 | +|`--all-images` |
| 17 | +|`oc adm must-gather --all-images=false` |
| 18 | +|Collect `must-gather` data using the default image for all Operators on the cluster that are annotated with `operators.openshift.io/must-gather-image`. |
| 19 | + |
| 20 | +|`--dest-dir` |
| 21 | +|`oc adm must-gather --dest-dir='<directory_name>'` |
| 22 | +|Set a specific directory on the local machine where the gathered data is written. |
| 23 | + |
| 24 | +|`--host-network` |
| 25 | +|`oc adm must-gather --host-network=false` |
| 26 | +|Run `must-gather` pods as `hostNetwork: true`. Relevant if a specific command and image needs to capture host-level data. |
| 27 | + |
| 28 | +|`--image` |
| 29 | +|`oc adm must-gather --image=[<plugin_image>]` |
| 30 | +|Specify a `must-gather` plugin image to run. If not specified, {product-title}'s default `must-gather` image is used. |
| 31 | +
|
| 32 | +|`--image-stream` |
| 33 | +|`oc adm must-gather --image-stream=[<image_stream>]` |
| 34 | +|Specify an`<image_stream>` using a namespace or name:tag value containing a `must-gather` plugin image to run. |
| 35 | +
|
| 36 | +|`--node-name` |
| 37 | +|`oc adm must-gather --node-name='<node>'` |
| 38 | +|Set a specific node to use. If not specified, by default a random master is used. |
| 39 | +
|
| 40 | +|`--node-selector` |
| 41 | +|`oc adm must-gather --node-selector='<node_selector_name>'` |
| 42 | +|Set a specific node selector to use. Only relevant when specifying a command and image which needs to capture data on a set of cluster nodes simultaneously. |
| 43 | +
|
| 44 | +|`--run-namespace` |
| 45 | +|`oc adm must-gather --run-namespace='<namespace>'` |
| 46 | +|An existing privileged namespace where `must-gather` pods should run. If not specified, a temporary namespace is generated. |
| 47 | +
|
| 48 | +|`--since` |
| 49 | +|`oc adm must-gather --since=<time>` |
| 50 | +|Only return logs newer than the specified duration. Defaults to all logs. Plugins are encouraged but not required to support this. Only one `since-time` or `since` may be used. |
| 51 | +
|
| 52 | +|`--since-time` |
| 53 | +|`oc adm must-gather --since-time='<date_and_time>'` |
| 54 | +|Only return logs after a specific date and time, expressed in (link:https://www.rfc-editor.org/rfc/rfc3339[RFC3339]) format. Defaults to all logs. Plugins are encouraged but not required to support this. Only one `since-time` or `since` may be used. |
| 55 | +
|
| 56 | +|`--source-dir` |
| 57 | +|`oc adm must-gather --source-dir='/<directory_name>/'` |
| 58 | +|Set the specific directory on the pod where you copy the gathered data from. |
| 59 | +
|
| 60 | +|`--timeout` |
| 61 | +|`oc adm must-gather --timeout='<time>'` |
| 62 | +|The length of time to gather data before timing out, expressed as seconds, minutes, or hours, for example, 3s, 5m, or 2h. Time specified must be higher than zero. Defaults to 10 minutes if not specified. |
| 63 | +
|
| 64 | +|`--volume-percentage` |
| 65 | +|`oc adm must-gather --volume-percentage=<percent>` |
| 66 | +|Specify maximum percentage of pod's allocated volume that can be used for `must-gather`. If this limit is exceeded, `must-gather` stops gathering, but still copies gathered data. Defaults to 30% if not specified. |
| 67 | +|==== |
0 commit comments