refactor: organize infra/ into compute/network/security/data/platform
This commit is contained in:
68
infra/network/metallb.md
Normal file
68
infra/network/metallb.md
Normal file
@@ -0,0 +1,68 @@
|
||||
---
|
||||
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 이전 이력: [[2026-03-24-k3s-postgresql-migration|history]] (Phase 5: MetalLB 도입)
|
||||
Reference in New Issue
Block a user