[Object] Kubernetes 환경에서 Alloy 구성 및 테스트 - I - Alloy 사전준비 > SUSE Rancher자료실

본문 바로가기
사이트 내 전체검색

SUSE Rancher자료실

[Object] Kubernetes 환경에서 Alloy 구성 및 테스트 - I - Alloy 사전준비

페이지 정보

profile_image
작성자 꿈꾸는여행자
댓글 0건 조회 6회 작성일 26-01-23 19:56

본문

안녕하세요.

 

꿈꾸는여행자입니다.

 


최근 Alloy 기반 Log 수집  관련 사항이 있어, 이에 대한 주제를 다루고자 합니다. 

대상은 K8s 환경에서 구성한 내용을 기반으로 공유 드립니다. 

 

K8s는 이미 설치되어 있다는 가정하에 진행한 상황입니다. 

 

 

이번 항목에서는 

Helm과 이미지 구성 준비 관련 사항입니다. 

 

상세 내역은 아래와 같습니다.



감사합니다. 


> 아래 

 

________________

 

 


목차 

 

VI. Alloy

1. Install

1.1. Overview

1.1.1 Kubernetes에서 Alloy의 역할

1.1.2 공식 문서가 권장하는 구성 요소

1.2. Air-gap 준비

1.2.1 Helm Chart 준비 (외부망)

1.2.2 이미지 반입 (skopeo)

1.2.2.1. Image List

1.2.2.2. Image 반입

 

 

 

 





VI. Alloy

1. Install

https://grafana.com/docs/alloy/latest/set-up/install/kubernetes/










1.1. Overview

1.1.1 Kubernetes에서 Alloy의 역할

                              * Node 로컬 로그 수집

                              * Kubernetes 메타데이터 자동 디스커버리

                              * Loki / Tempo / Mimir로 push 기반 전송

                              * Flow

Kubernetes Node

 └─ Alloy (DaemonSet)

      ├─ /var/log/containers/*.log

      ├─ Kubernetes metadata

      └─ → Loki Distributor



                              * 


1.1.2 공식 문서가 권장하는 구성 요소

기능

Alloy 컴포넌트

Pod 발견

discovery.kubernetes

로그 수집

loki.source.kubernetes

로그 파싱

loki.process

Loki 전송

loki.write


1.2. Air-gap 준비

1.2.1 Helm Chart 준비 (외부망)



helm repo add grafana https://grafana.github.io/helm-charts



helm repo update



helm search repo alloy



helm pull grafana/alloy --version 1.5.2 

[root@k8s-mst-00 grafana]# helm repo add grafana https://grafana.github.io/helm-charts

"grafana" already exists with the same configuration, skipping

[root@k8s-mst-00 grafana]# 

[root@k8s-mst-00 grafana]# helm repo update

Hang tight while we grab the latest from your chart repositories...

...Successfully got an update from the "minio-operator" chart repository

...Successfully got an update from the "opensearch" chart repository

...Successfully got an update from the "opensearch-project-helm-charts" chart repository

...Successfully got an update from the "harbor" chart repository

...Successfully got an update from the "redis-operator" chart repository

...Successfully got an update from the "minio" chart repository

...Successfully got an update from the "grafana" chart repository

...Successfully got an update from the "gitlab" chart repository

...Successfully got an update from the "apache-airflow" chart repository

...Successfully got an update from the "cnpg" chart repository

Update Complete. ⎈Happy Helming!⎈

[root@k8s-mst-00 grafana]#

[root@k8s-mst-00 grafana]# helm search repo alloy

NAME                    CHART VERSION   APP VERSION     DESCRIPTION                                       

grafana/alloy           1.5.2           v1.12.2         Grafana Alloy                                     

grafana/alloy-crd       1.0.0           1.0.0           A Helm chart the Alloy CustomResourceDefinition...

grafana/alloy-operator  0.4.0           1.5.2           A Helm chart the Alloy Operator, a project to i...

[root@k8s-mst-00 grafana]#

[root@k8s-mst-00 grafana]# helm pull grafana/alloy --version 1.5.2

[root@k8s-mst-00 grafana]# 

[root@k8s-mst-00 grafana]# ls

alloy-1.5.2.tgz  loki-6.51.0.tgz  loki-images  loki-values-min.yaml  loki-values.yaml  loki.yaml

[root@k8s-mst-00 grafana]#


1.2.2 이미지 반입 (skopeo)

1.2.2.1. Image List



helm template alloy ./alloy-1.5.2.tgz > alloy.yaml

grep image: alloy.yaml | sort -u

[root@k8s-mst-00 grafana]# helm template alloy ./alloy-1.5.2.tgz > alloy.yaml

[root@k8s-mst-00 grafana]# grep image: alloy.yaml | sort -u

          image: docker.io/grafana/alloy:v1.12.2

          image: quay.io/prometheus-operator/prometheus-config-reloader:v0.81.0

[root@k8s-mst-00 grafana]#


1.2.2.2. Image 반입



# 인터넷 가능 Bastion Node에서 수행



cd grafana

mkdir alloy-images

cd alloy-images/



skopeo copy docker://docker.io/grafana/alloy:v1.12.2 \

  docker-archive:alloy_v1.12.2.tar



skopeo copy docker://quay.io/prometheus-operator/prometheus-config-reloader:v0.81.0 \

  docker-archive:prometheus-config-reloader_v0.81.0.tar



[root@k8s-mst-00 grafana]# mkdir alloy-images

[root@k8s-mst-00 grafana]# cd alloy-images/

[root@k8s-mst-00 alloy-images]# skopeo copy docker://docker.io/grafana/alloy:v1.12.2 \

  docker-archive:alloy_v1.12.2.tar

Getting image source signatures

Copying blob 20043066d3d5 done   | 

Copying blob 153841ed3478 done   | 

Copying blob a991fff2d396 done   | 

Copying blob 422e8df0000b done   | 

Copying blob fb42a9ea83f5 done   | 

Copying config 3a35863522 done   | 

Writing manifest to image destination

[root@k8s-mst-00 alloy-images]# skopeo copy docker://quay.io/prometheus-operator/prometheus-config-reloader:v0.81.0 \

  docker-archive:prometheus-config-reloader_v0.81.0.tar

Getting image source signatures

Copying blob 9fa9226be034 done   | 

Copying blob 1617e25568b2 done   | 

Copying blob 9c8cb679a775 done   | 

Copying config b3743bfbbd done   | 

Writing manifest to image destination

[root@k8s-mst-00 alloy-images]#

 

 

 

 

 

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

회사명 : (주)리눅스데이타시스템
대표이사 : 정정모
본사 : 강남구 봉은사로 114길 40 홍선빌딩 2층
- tel : 02-6207-1160
대전지사 : 유성구 노은로174 도원프라자 5층
- tel : 042-331-1161

접속자집계

오늘
576
어제
2,639
최대
8,445
전체
2,037,967
Copyright © www.linuxdata.org All rights reserved.