# VictoriaLogs Cluster 배포 AccountID 기반 스토리지 격리를 지원하는 로그 스토리지. vlinsert(쓰기)·vlstorage(저장)·vlselect(조회)로 구성된다. ## 1. 배포 방법 ```sh helm upgrade vlogs ./ -f custom-values.yaml --install -n monitoring ``` 배포 시 주의: - **클러스터 모드**를 사용한다. 단일 노드(victoria-logs-single)는 AccountID 헤더를 수신하지만 스토리지를 분리하지 않는다. 클러스터는 URL/헤더의 AccountID로 실제 격리 저장한다. - `vlstorage`는 PVC를 사용한다(기본 5Gi). ## 2. custom-values.yaml 설정 설명 | 컴포넌트 | 포트 | 역할 | |----------|------|------| | vlinsert | 9481 | 로그 쓰기 — `/insert/{AccountID}/opentelemetry/v1/logs` | | vlstorage | 9491 | AccountID별 격리 저장 (보존기간 `retentionPeriod: 7d`) | | vlselect | 9471 | LogsQL 쿼리 — `/select/{AccountID}/logsql/query` | `vlstorage.extraArgs."memory.allowedPercent": "60"`으로 메모리 사용 상한을 제한한다. ## 3. 의존 관계 - **쓰기**: opentelemetry-collector → vlinsert:9481 (`AccountID`/`ProjectID` 헤더로 테넌트 지정. `VictoriaLogs-*` 접두 헤더는 무시됨) - **조회**: vmauth → vlselect:9471 (Perses victorialogs 데이터소스가 vmauth 경유) ## 4. 검증 ```sh kubectl get pods -n monitoring -l app.kubernetes.io/instance=vlogs kubectl port-forward -n monitoring svc/vlogs-victoria-logs-cluster-vlselect 9471:9471 curl -s 'http://localhost:9471/select/0/logsql/query?query=*&limit=1' ```