4.6. 네트워크가 제한된 환경에서 원격 상태 보고 사용
Insights Operator 아카이브를 수동으로 수집 및 업로드하여 제한된 네트워크에서 문제를 진단할 수 있습니다.
제한된 네트워크에서 Insights Operator를 사용하려면 다음을 수행해야 합니다.
- Insights Operator 아카이브 사본을 만듭니다.
- Insights Operator 아카이브를 console.redhat.com에 업로드합니다.
또한 업로드하기 전에 Insights Operator 데이터를 난독화 하도록 선택할 수 있습니다.
4.6.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출력 예
apiVersion: apps/v1 kind: Deployment metadata: name: insights-operator namespace: openshift-insights # ... spec: template: # ... spec: containers: - args: # ... image: registry.ci.openshift.org/ocp/4.15-2023-10-12-212500@sha256:a0aa581400805ad0...1 # ...- 1
insights-operator이미지 버전을 지정합니다.
gather-job.yaml에 이미지 버전을 붙여 넣습니다.apiVersion: batch/v1 kind: Job metadata: name: insights-operator-job # ... spec: # ... template: spec: initContainers: - name: insights-operator image: image: registry.ci.openshift.org/ocp/4.15-2023-10-12-212500@sha256:a0aa581400805ad0...1 terminationMessagePolicy: FallbackToLogsOnError volumeMounts:- 1
- 기존 값을
insights-operator이미지 버전으로 교체합니다.
수집 작업을 생성합니다.
$ oc apply -n openshift-insights -f gather-job.yaml작업 Pod의 이름을 찾습니다.
$ oc describe -n openshift-insights job/insights-operator-job출력 예
Name: insights-operator-job Namespace: openshift-insights # ... 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