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.8.2. 로그 전달 사용자 정의 리소스 업데이트
OpenShift Container Platform Log Forward API는 기술 프리뷰에서 OpenShift Container Platform 4.6에서 일반적으로 사용 가능으로 승격되었습니다. GA 릴리스에는 ClusterLogging
사용자 정의 리소스(CR)를 변경하고 LogForwarding
사용자 정의 리소스(CR)를 ClusterLogForwarder
CR로 교체해야 하는 몇 가지 개선 사항 및 향상된 사항이 포함되어 있습니다.
OpenShift Container Platform 4.6의 샘플 ClusterLogForwarder
인스턴스
OpenShift Container Platform 4.5의 샘플 ClusterLogForwarder
CR
다음 절차는 변경해야 하는 각 매개변수를 보여줍니다.
프로세스
4.5의 ClusterLogForwarder
CR을 4.6용 ClusterLogForwarding
CR로 업데이트하려면 다음과 같이 수정합니다.
ClusterLogging
사용자 정의 리소스(CR)를 편집하여logforwardingtechpreview
주석을 제거합니다.샘플
ClusterLogging
CRCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
logforwardingtechpreview
주석을 제거합니다.
ClusterLogForwarder
CR을 내보내ClusterLogForwarder
인스턴스의 YAML 파일을 생성합니다.oc get LogForwarding instance -n openshift-logging -o yaml| tee ClusterLogForwarder.yaml
$ oc get LogForwarding instance -n openshift-logging -o yaml| tee ClusterLogForwarder.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow YAML 파일을 편집하여 다음과 같이 수정합니다.
OpenShift Container Platform 4.6의 샘플
ClusterLogForwarder
인스턴스Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
apiVersion
을"logging.openshift.io/v1alpha1"
에서"logging.openshift.io/v1"
로 변경합니다.- 2
- 오브젝트 유형을
kind에서 변경합니다. "LogForwarding"
~kind: "ClusterLogForwarder"
. - 3
disableDefaultForwarding: true
매개변수를 제거합니다.- 4
- 출력 매개변수를
spec.outputs.endpoint
에서spec.outputs.url
로 변경합니다. 접두사가 없는 경우https://
,tcp://
등과 같은 접두사를 URL에 추가합니다. - 5
- Fluentd 출력의 경우
유형
을forward
에서fluentdForward
로 변경합니다. - 6
- 파이프라인 변경:
-
spec.pipelines.inputSource
를spec.pipelines.inputRefs
로 변경 -
logs.infra
를인프라
로 변경 -
logs.app
을애플리케이션
으로 변경 -
logs.audit
를감사
로 변경
-
- 7
- 선택 사항:
기본
파이프라인을 추가하여 내부 Elasticsearch 인스턴스로 로그를 보냅니다.기본
출력을 구성할 필요는 없습니다.참고내부 OpenShift Container Platform Elasticsearch 인스턴스에만 로그를 전달하려면 Log Forwarding API를 구성하지 마십시오.
CR 오브젝트를 생성합니다.
oc create -f ClusterLogForwarder.yaml
$ oc create -f ClusterLogForwarder.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Log Forwarding API의 새로운 기능에 대한 자세한 내용은 타사 시스템에 로그 전달을 참조하십시오.