편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
8번째 줄: | 8번째 줄: | ||
Fluent Bit 는 Kubernetes를 완벽하게 지원하는 가볍고 확장가능한 로그 처리기입니다. | Fluent Bit 는 Kubernetes를 완벽하게 지원하는 가볍고 확장가능한 로그 처리기입니다. | ||
* 파일 시스템 또는 Systemd/Journald에서 Kubernetes 컨테이너 로그를 처리합니다. | * 파일 시스템 또는 Systemd/Journald에서 Kubernetes 컨테이너 로그를 처리합니다. | ||
* Kubernetes 메타데이터로 로그를 | * Kubernetes 메타데이터로 로그를 강화(enrich)하세요. | ||
* Elasticsearch, InfluxDB, HTTP와 같은 서드파티 스토리지 서비스로 로그를 중앙화하세요. | * Elasticsearch, InfluxDB, HTTP와 같은 서드파티 스토리지 서비스로 로그를 중앙화하세요. | ||
14번째 줄: | 14번째 줄: | ||
시작하기 전에 Fluent Bit가 어떻게 배포되는지 이해하는 것이 중요합니다. Kubernetes는 노드 클러스터를 관리하므로, 로그 에이전트 도구는 모든 POD에서 로그를 수집하기 위해 모든 노드에서 실행되어야 하므로 Fluent Bit는 DaemonSet(클러스터의 모든 노드에서 실행되는 POD)로 배포됩니다. | 시작하기 전에 Fluent Bit가 어떻게 배포되는지 이해하는 것이 중요합니다. Kubernetes는 노드 클러스터를 관리하므로, 로그 에이전트 도구는 모든 POD에서 로그를 수집하기 위해 모든 노드에서 실행되어야 하므로 Fluent Bit는 DaemonSet(클러스터의 모든 노드에서 실행되는 POD)로 배포됩니다. | ||
Fluent Bit가 실행되면 모든 POD의 로그를 읽고 | Fluent Bit가 실행되면 모든 POD의 로그를 읽고 구문 분석하고 필터링하며 다음 정보(메타데이터)로 각 항목을 강화합니다. | ||
* 파드 이름 | * 파드 이름 | ||
* 파드 ID | * 파드 ID | ||
32번째 줄: | 32번째 줄: | ||
===OpenShift 참고사항=== | ===OpenShift 참고사항=== | ||
Red Hat | If you are using Red Hat OpenShift you will also need to set up security context constraints (SCC): | ||
<syntaxhighlight lang=' | <syntaxhighlight lang='ini'> | ||
$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-openshift-security-context-constraints.yaml | $ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-openshift-security-context-constraints.yaml | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Helm 차트로 설치=== | ===Helm 차트로 설치=== | ||
Helm is a package manager for Kubernetes and allows you to quickly deploy application packages into your running cluster. Fluent Bit is distributed via a helm chart found in the Fluent Helm Charts repo: https://github.com/fluent/helm-charts. | |||
Fluent Helm Charts | To add the Fluent Helm Charts repo use the following command | ||
helm repo add fluent https://fluent.github.io/helm-charts | helm repo add fluent https://fluent.github.io/helm-charts | ||
To validate that the repo was added you can run helm search repo fluent to ensure the charts were added. The default chart can then be installed by running the following | |||
helm upgrade --install fluent-bit fluent/fluent-bit | helm upgrade --install fluent-bit fluent/fluent-bit | ||
===기본값=== | ===기본값=== | ||
The default chart values include configuration to read container logs, with Docker parsing, systemd logs apply Kubernetes metadata enrichment and finally output to an Elasticsearch cluster. You can modify the values file included https://github.com/fluent/helm-charts/blob/master/charts/fluent-bit/values.yaml to specify additional outputs, health checks, monitoring endpoints, or other configuration options. | |||
==세부사항== | ==세부사항== | ||
Fluent | The default configuration of Fluent Bit makes sure of the following: | ||
Consume all containers logs from the running Node. | |||
The Tail input plugin will not append more than 5MB into the engine until they are flushed to the Elasticsearch backend. This limit aims to provide a workaround for backpressure scenarios. | |||
The Kubernetes filter will enrich the logs with Kubernetes metadata, specifically labels and annotations. The filter only goes to the API Server when it cannot find the cached info, otherwise it uses the cache. | |||
The default backend in the configuration is Elasticsearch set by the Elasticsearch Output Plugin. It uses the Logstash format to ingest the logs. If you need a different Index and Type, please refer to the plugin option and do your own adjustments. | |||
There is an option called Retry_Limit set to False, that means if Fluent Bit cannot flush the records to Elasticsearch it will re-try indefinitely until it succeed. | |||
==컨테이너 런타임 인터페이스(CRI) 파서== | ==컨테이너 런타임 인터페이스(CRI) 파서== | ||
Fluent | Fluent Bit by default assumes that logs are formatted by the Docker interface standard. However, when using CRI you can run into issues with malformed JSON if you do not modify the parser used. Fluent Bit includes a CRI log parser that can be used instead. An example of the parser is seen below: | ||
<syntaxhighlight lang='ini'> | <syntaxhighlight lang='ini'> | ||
78번째 줄: | 78번째 줄: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To use this parser change the Input section for your configuration from docker to cri | |||
<syntaxhighlight lang='ini'> | <syntaxhighlight lang='ini'> | ||
182번째 줄: | 182번째 줄: | ||
* <code>DNS_Retries</code> - 네트워크가 작동하기 시작할 때까지 N번 재시도 (6) | * <code>DNS_Retries</code> - 네트워크가 작동하기 시작할 때까지 N번 재시도 (6) | ||
* <code>DNS_Wait_Time</code> - 네트워크 상태 확인 간격 (30) | * </code>DNS_Wait_Time</code> - 네트워크 상태 확인 간격 (30) | ||
기본적으로, Fluent Bit는 3분(30초 x 6회)동안 기다립니다. 충분하지 않은 경우 다음과 같이 설정을 조정하십시오. | 기본적으로, Fluent Bit는 3분(30초 x 6회)동안 기다립니다. 충분하지 않은 경우 다음과 같이 설정을 조정하십시오. |