Add MetalLB/Teleport docs, update APISIX/sshpiper/OpenWrt for NodePort→LoadBalancer migration

This commit is contained in:
kappa
2026-03-26 12:00:30 +09:00
parent 259ebe8434
commit 140631b36a
5 changed files with 148 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
---
title: APISIX 설정 및 운영
updated: 2026-03-25
updated: 2026-03-26
---
## 아키텍처
@@ -19,7 +19,8 @@ updated: 2026-03-25
- etcd: incus-jp1 db 프로젝트 `etcd-1` (10.253.102.11:2379), prefix `/apisix-sandbox`
- 설정 파일: `/opt/apisix/` (config.yaml, docker-compose.yml)
- 모드: stream only (HTTP proxy 비활성화, 9080 미사용)
- 방화벽: 2201-2299/tcp 개방, SSH는 Tailscale 경유
- 방화벽: 2201-2299/tcp + 443/tcp 개방, SSH는 Tailscale 경유
- 443 → iptables REDIRECT → 8443 (privileged 포트 우회)
- 2026-03-17 AWS EC2에서 Lightsail nano($5/월)로 이전
#### 포트 포워딩 (stream_routes)
@@ -27,6 +28,7 @@ updated: 2026-03-25
| 포트 | 용도 | upstream | 비고 |
|------|------|----------|------|
| 2201 | inbest SSH | 10.100.1.158:22 | inbest 전용 SSH 포트, OpenWrt Tailscale 광고 경유 |
| 8443 (외부 443) | Teleport | 192.168.9.52:443 | K3s MetalLB → Teleport proxy, iptables 443→8443 리다이렉트 |
### 오사카 (apisix-osaka)
```
@@ -39,7 +41,7 @@ BunnyCDN(inouter, ID 5316471) → apisix-osaka(172.233.93.180) → 백엔드
### 서울 (K3s 새 클러스터, apisix 네임스페이스) — SafeLine WAF 전용
```
외부 → OpenWrt HAProxy(:9080/:9443) → NodePort(30233/31137, 3노드 roundrobin) → APISIX(replica 1) → K3s 서비스
외부 → OpenWrt HAProxy(:9080/:9443) → MetalLB 192.168.9.50(80/443) → APISIX(replica 1) → K3s 서비스
```
- 용도: SafeLine WAF 전용 리버스 프록시 (메인 라우팅은 Traefik으로 이전)
- 클러스터: K3s 새 클러스터 (Supabase PostgreSQL 백엔드, kr2+kr1+hp2)
@@ -47,10 +49,10 @@ BunnyCDN(inouter, ID 5316471) → apisix-osaka(172.233.93.180) → 백엔드
- APISIX: 3.15.0-ubuntu
- SafeLine WAF 연동: `plugin_attr.chaitin-waf``safeline-detector:8000` (10.43.253.244)
- global_rules: `chaitin-waf` (mode: block) + `limit-req` (rate 20, burst 10)
- 서비스: apisix-gateway NodePort (80→9080, 443→9443, NodePort 30233/31137)
- 서비스: apisix-gateway LoadBalancer 192.168.9.50 (80→9080, 443→9443)
- etcd: apisix-etcd StatefulSet (K3s 내부)
- Admin API: `apisix-admin` ClusterIP :9180 (라우트/upstream/SSL 수동 관리)
- HAProxy: OpenWrt에서 :9080→30233, :9443→31137 (3노드 roundrobin)
- HAProxy: OpenWrt에서 :9080→192.168.9.50:80, :9443→192.168.9.50:443 (MetalLB)
- 2026-03-25 메인 라우팅 역할을 Traefik으로 이전, APISIX는 SafeLine WAF 전용으로 축소
- Ingress Controller + Gateway API CRD 제거됨 (GatewayProxy 모드에서 ApisixRoute CRD 미지원, HTTPRoute에 플러그인 개별 적용 불가 문제)