This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.第5章 クラスターに関するデータの収集
サポートケースを作成する際、ご使用のクラスターについてのデバッグ情報を Red Hat サポートに提供していただくと Red Hat のサポートに役立ちます。
以下を提供することが推奨されます。
5.1. must-gather ツールについて リンクのコピーリンクがクリップボードにコピーされました!
oc adm must-gather
CLI コマンドは、以下のような問題のデバッグに必要となる可能性のあるクラスターからの情報を収集します。
- リソース定義
- サービスログ
デフォルトで、oc adm must-gather
コマンドはデフォルトのプラグインイメージを使用し、./must-gather.local
に書き込みを行います。
または、以下のセクションで説明されているように、適切な引数を指定してコマンドを実行すると、特定の情報を収集できます。
1 つ以上の特定の機能に関連するデータを収集するには、以下のセクションに示すように、イメージと共に
--image
引数を使用します。以下に例を示します。
oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.11.0
$ oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.11.0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 監査ログを収集するには、以下のセクションで説明されているように
-- /usr/bin/gather_audit_logs
引数を使用します。以下に例を示します。
oc adm must-gather -- /usr/bin/gather_audit_logs
$ oc adm must-gather -- /usr/bin/gather_audit_logs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注記ファイルのサイズを小さくするために、監査ログはデフォルトの情報セットの一部として収集されません。
oc adm must-gather
を実行すると、ランダムな名前を持つ新規 Pod がクラスターの新規プロジェクトに作成されます。データは Pod で収集され、must-gather.local
で始まる新規ディレクトリーに保存されます。このディレクトリーは、現行の作業ディレクトリーに作成されます。
以下に例を示します。
NAMESPACE NAME READY STATUS RESTARTS AGE ... openshift-must-gather-5drcj must-gather-bklx4 2/2 Running 0 72s openshift-must-gather-5drcj must-gather-s8sdh 2/2 Running 0 72s ...
NAMESPACE NAME READY STATUS RESTARTS AGE
...
openshift-must-gather-5drcj must-gather-bklx4 2/2 Running 0 72s
openshift-must-gather-5drcj must-gather-s8sdh 2/2 Running 0 72s
...
5.1.1. Red Hat サポート用のクラスターについてのデータの収集 リンクのコピーリンクがクリップボードにコピーされました!
oc adm must-gather
CLI コマンドを使用して、クラスターについてのデバッグ情報を収集できます。
前提条件
-
cluster-admin
ロールを持つユーザーとしてクラスターにアクセスできる。 -
OpenShift Container Platform CLI (
oc
) がインストールされている。
手順
must-gather
データを保存するディレクトリーに移動します。注記クラスターが非接続環境にある場合は、追加の手順を実行する必要があります。ミラーレジストリーに信頼される CA がある場合、まず信頼される CA をクラスターに追加する必要があります。非接続環境のすべてのクラスターに対して、デフォルトの
must-gather
イメージをイメージストリームとしてインポートする必要があります。oc import-image is/must-gather -n openshift
$ oc import-image is/must-gather -n openshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc adm must-gather
コマンドを実行します。oc adm must-gather
$ oc adm must-gather
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 重要非接続環境を使用している場合には、must-gather の一部として
--image
フラグを使用し、ペイロードイメージを参照します。注記このコマンドは、デフォルトでランダムなコントロールプレーンノードを選択するため、Pod は
NotReady
およびSchedulingDisabled
状態のコントロールプレーンノードにスケジュールされる場合があります。このコマンドが失敗する場合 (クラスターで Pod をスケジュールできない場合など)、
oc adm inspect
コマンドを使用して、特定リソースに関する情報を収集します。注記収集する推奨リソースについては、Red Hat サポートにお問い合わせください。
作業ディレクトリーに作成された
must-gather
ディレクトリーから圧縮ファイルを作成します。たとえば、Linux オペレーティングシステムを使用するコンピューターで以下のコマンドを実行します。tar cvaf must-gather.tar.gz must-gather.local.5421342344627712289/
$ tar cvaf must-gather.tar.gz must-gather.local.5421342344627712289/
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
must-gather-local.5421342344627712289/
を実際のディレクトリー名に置き換えてください。
- Red Hat カスタマーポータルの カスタマーサポート ページ で、圧縮ファイルをサポートケースに添付します。
5.1.2. 特定の機能に関するデータ収集 リンクのコピーリンクがクリップボードにコピーされました!
oc adm must-gather
CLI コマンドを --image
または --image-stream
引数と共に使用して、特定に機能についてのデバッグ情報を収集できます。must-gather
ツールは複数のイメージをサポートするため、単一のコマンドを実行して複数の機能についてのデータを収集できます。
イメージ | 目的 |
---|---|
| OpenShift Virtualization のデータ収集。 |
| OpenShift Serverless のデータ収集。 |
| Red Hat OpenShift Service Mesh のデータ収集。 |
| Migration Toolkit for Containers のデータ収集。 |
| Red Hat OpenShift Data Foundation のデータ収集。 |
| OpenShift Logging のデータ収集。 |
| OpenShift Shared Resource CSI Driver のデータ収集。 |
| ローカルストレージ Operator のデータ収集。 |
| OpenShift サンドボックスコンテナーのデータ収集。 |
| Self Node Remediation Operator および Node Health Check Operator のデータ収集。 |
| PTP Operator のデータ収集。 |
| Node Maintenance Operator のデータ収集。 |
| Red Hat OpenShift Pipelines のデータ収集 |
OpenShift Container Platform コンポーネントのイメージの最新バージョンを確認するには、Red Hat カスタマーポータルの Red Hat OpenShift Container Platform ライフサイクルポリシー の Web ページを参照してください。
前提条件
-
cluster-admin
ロールを持つユーザーとしてクラスターにアクセスできる。 -
OpenShift Container Platform CLI (
oc
) がインストールされている。
手順
-
must-gather
データを保存するディレクトリーに移動します。 oc adm must-gather
コマンドを 1 つまたは複数の--image
または--image-stream
引数と共に実行します。注記-
特定の機能データに加えてデフォルトの
must-gather
データを収集するには、--image-stream=openshift/must-gather
引数を追加します。 - Custom Metrics Autoscaler に関するデータの収集については、以下の関連情報セクションを参照してください。
たとえば、以下のコマンドは、デフォルトのクラスターデータと OpenShift Virtualization に固有の情報の両方を収集します。
oc adm must-gather \ --image-stream=openshift/must-gather \ --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.11.8
$ oc adm must-gather \ --image-stream=openshift/must-gather \
1 --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.11.8
2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow must-gather
ツールを追加の引数と共に使用し、OpenShift Logging およびクラスター内の Red Hat OpenShift Logging Operator に関連するデータを収集できます。OpenShift Logging の場合、以下のコマンドを実行します。oc adm must-gather --image=$(oc -n openshift-logging get deployment.apps/cluster-logging-operator \ -o jsonpath='{.spec.template.spec.containers[?(@.name == "cluster-logging-operator")].image}')
$ oc adm must-gather --image=$(oc -n openshift-logging get deployment.apps/cluster-logging-operator \ -o jsonpath='{.spec.template.spec.containers[?(@.name == "cluster-logging-operator")].image}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例5.1 OpenShift Logging の
must-gather
の出力例Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
特定の機能データに加えてデフォルトの
oc adm must-gather
コマンドを 1 つまたは複数の--image
または--image-stream
引数と共に実行します。たとえば、以下のコマンドは、デフォルトのクラスターデータと KubeVirt に固有の情報の両方を収集します。oc adm must-gather \ --image-stream=openshift/must-gather \ --image=quay.io/kubevirt/must-gather
$ oc adm must-gather \ --image-stream=openshift/must-gather \
1 --image=quay.io/kubevirt/must-gather
2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow 作業ディレクトリーに作成された
must-gather
ディレクトリーから圧縮ファイルを作成します。たとえば、Linux オペレーティングシステムを使用するコンピューターで以下のコマンドを実行します。tar cvaf must-gather.tar.gz must-gather.local.5421342344627712289/
$ tar cvaf must-gather.tar.gz must-gather.local.5421342344627712289/
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
must-gather-local.5421342344627712289/
を実際のディレクトリー名に置き換えてください。
- Red Hat カスタマーポータルの カスタマーサポート ページ で、圧縮ファイルをサポートケースに添付します。