4.7. 限定的なネットワーク環境でのリモートヘルスレポートの使用
Insights Operator アーカイブを手動で収集し、アップロードして限定的なネットワーク環境から問題を診断できます。
限定定期なネットワーク環境で Insights Operator を使用するには、以下を行う必要があります。
- Insights Operator アーカイブのコピーを作成します。
- Insights Operator アーカイブを console.redhat.com にアップロードします。
さらに、アップロード前に Insights Operator データを 難読化 することを選択できます。
4.7.1. Insights Operator の収集操作の実行
Insights Operator アーカイブを作成するには、収集操作を実行する必要があります。
前提条件
-
cluster-admin
として OpenShift Container Platform にログインしている。
手順
以下のテンプレートを使用して、
gather-job.yaml
という名前のファイルを作成します。apiVersion: batch/v1 kind: Job metadata: name: insights-operator-job annotations: config.openshift.io/inject-proxy: insights-operator spec: backoffLimit: 6 ttlSecondsAfterFinished: 600 template: spec: restartPolicy: OnFailure serviceAccountName: operator nodeSelector: beta.kubernetes.io/os: linux node-role.kubernetes.io/master: "" tolerations: - effect: NoSchedule key: node-role.kubernetes.io/master operator: Exists - effect: NoExecute key: node.kubernetes.io/unreachable operator: Exists tolerationSeconds: 900 - effect: NoExecute key: node.kubernetes.io/not-ready operator: Exists tolerationSeconds: 900 volumes: - name: snapshots emptyDir: {} - name: service-ca-bundle configMap: name: service-ca-bundle optional: true initContainers: - name: insights-operator image: quay.io/openshift/origin-insights-operator:latest terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - name: snapshots mountPath: /var/lib/insights-operator - name: service-ca-bundle mountPath: /var/run/configmaps/service-ca-bundle readOnly: true ports: - containerPort: 8443 name: https resources: requests: cpu: 10m memory: 70Mi args: - gather - -v=4 - --config=/etc/insights-operator/server.yaml containers: - name: sleepy image: quay.io/openshift/origin-base:latest args: - /bin/sh - -c - sleep 10m volumeMounts: [{name: snapshots, mountPath: /var/lib/insights-operator}]
insights-operator
イメージバージョンをコピーします。$ oc get -n openshift-insights deployment insights-operator -o yaml
gather-job.yaml
でイメージのバージョンを貼り付けます。initContainers: - name: insights-operator image: <your_insights_operator_image_version> terminationMessagePolicy: FallbackToLogsOnError volumeMounts:
収集ジョブを作成します。
$ oc apply -n openshift-insights -f gather-job.yaml
ジョブ Pod の名前を見つけます。
$ oc describe -n openshift-insights job/insights-operator-job
出力例
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 7m18s job-controller Created pod: insights-operator-job-<your_job>
insights-operator-job-<your_job>
は Pod の名前です。操作が完了したことを確認します。
$ oc logs -n openshift-insights insights-operator-job-<your_job> insights-operator
出力例
I0407 11:55:38.192084 1 diskrecorder.go:34] Wrote 108 records to disk in 33ms
作成したアーカイブを保存します。
$ oc cp openshift-insights/insights-operator-job-<your_job>:/var/lib/insights-operator ./insights-data
ジョブをクリーンアップします。
$ oc delete -n openshift-insights job insights-operator-job