Files
obsidian/infra/metallb.md
kappa 2356b86d36 obsidian: 정본 문서에서 히스토리/인시던트 분리 완료
15개 정본 문서에서 날짜별 변경이력, 인시던트 기록, 폐기된 구현 상세를
history/ 디렉토리로 분리. 정본은 현재 상태만 기술하는 백서 형태로 정리.
각 정본에 history 위키링크 추가.

분리된 history 파일 12건:
- apisix git push 500, k3s postgresql migration, apisix→traefik 전환
- netbis DDoS 공격, gitea 이전/분리, usb 2.5g hang + NFS hard mount
- supabase→patroni, apisix etcd 통합/분리, anomaly-detect 재설계
- patroni failover incident, zlambda nixos migration, ops-agents setup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:09:21 +09:00

69 lines
1.7 KiB
Markdown

---
title: MetalLB (K3s LoadBalancer)
updated: 2026-03-26
tags: [infra, k3s, metallb, networking]
---
## 개요
K3s 클러스터에 LoadBalancer 타입 서비스를 제공하는 베어메탈 로드밸런서.
K3s 내장 ServiceLB(Klipper)는 비활성화 (`--disable servicelb`, kr2/kr1 config.yaml).
## 배포 정보
| 항목 | 값 |
|------|-----|
| Namespace | metallb-system |
| Chart | metallb/metallb |
| Helm repo | https://metallb.github.io/metallb |
| 모드 | L2 Advertisement |
| IP 풀 | 192.168.9.50 - 192.168.9.59 (10개) |
| Speaker | DaemonSet (노드당 1개, 3개) |
| Controller | Deployment (1개) |
## IP 할당 현황
| IP | Service | Namespace | Port |
|----|---------|-----------|------|
| 192.168.9.50 | apisix-gateway | apisix | 80, 443 |
| 192.168.9.51 | sshpiper | sshpiper | 2222 |
| 192.168.9.52 | teleport-cluster | teleport | 443 |
| 192.168.9.53 | traefik | kube-system | 80, 443 |
## DNS 매핑
- `k3s.inouter.com` → 192.168.9.53 (Traefik LB, 이전 3노드 IP에서 변경)
- `teleport.inouter.com` → 52.79.45.166 (relay4wd 경유)
## 설정
```yaml
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: default-pool
namespace: metallb-system
spec:
addresses:
- 192.168.9.50-192.168.9.59
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: default
namespace: metallb-system
spec:
ipAddressPools:
- default-pool
```
## 관리 명령
```bash
kubectl get ipaddresspool -n metallb-system # IP 풀 확인
kubectl get l2advertisement -n metallb-system # L2 광고 확인
kubectl get svc --all-namespaces -o wide | grep LoadBalancer # LB 서비스 목록
```
NodePort → LoadBalancer 이전 이력: [[../history/2026-03-24-k3s-postgresql-migration|history]] (Phase 5: MetalLB 도입)