# client — 트래픽 소스(sidecar 주입됨). 여기가 이 랩의 관측 지점이다. # # 핵심: dnsPolicy:None + dnsConfig.nameservers=[lab-dns] 로 이 파드의 /etc/resolv.conf 를 # 사설 lab-dns 로 덮는다. app 컨테이너와 istio-proxy 가 같은 resolv.conf 를 공유하므로, # Envoy(c-ares)의 gslb.lab.internal 해석도 lab-dns 를 타게 된다(= GSLB flip 통제). # searches/ndots 는 남겨 둬야 istiod.istio-system.svc 같은 클러스터 이름도 # (lab-dns → forward → cluster DNS 경로로) 계속 resolve 된다. # # __LABDNS_IP__ 는 scripts/dns-lab-setup.sh 가 lab-dns Service의 ClusterIP로 치환한다. # # 구성 2종: # - fortio: keepalive 부하생성기(커넥션 재사용/에러율/재연결을 정량 리포트) → "롱세션 드롭" 관측 # - netshoot: dig/curl/nc/openssl 진단용 --- apiVersion: apps/v1 kind: Deployment metadata: { name: fortio, namespace: dns-lab, labels: { app: fortio } } spec: replicas: 1 selector: { matchLabels: { app: fortio } } template: metadata: labels: { app: fortio } annotations: # Istio 기본 stats matcher 는 cardinality 절감을 위해 cluster 단위 upstream_cx_* 를 억제한다. # gslb 클러스터 stats(특히 upstream_cx_destroy)를 명시 포함 → 이게 STRICT(flip 시 cx_destroy 급증) # vs LOGICAL(flip 시 cx_destroy 불변, 기존 세션 유지) 을 가르는 정본 카운터다. proxy.istio.io/config: | proxyStatsMatcher: inclusionRegexps: - ".*gslb.*" spec: dnsPolicy: None dnsConfig: nameservers: ["__LABDNS_IP__"] searches: # __CLUSTER_DOMAIN__ = setup.sh 가 클러스터 coredns 에서 - dns-lab.svc.__CLUSTER_DOMAIN__ # 자동 발견(이 클러스터는 homelab.local — cluster.local 아님). - svc.__CLUSTER_DOMAIN__ # 하드코딩하면 커스텀 도메인 클러스터에서 istiod resolve 실패 → - __CLUSTER_DOMAIN__ # sidecar XDS 불가 → Envoy 안 뜸(2026-07-01 실제 발생). options: - { name: ndots, value: "5" } containers: - name: fortio image: fortio/fortio:latest args: ["server"] # idle 상태로 상주 → 여기서 `fortio load` 를 exec ports: [{ containerPort: 8080 }] --- apiVersion: apps/v1 kind: Deployment metadata: { name: netshoot, namespace: dns-lab, labels: { app: netshoot } } spec: replicas: 1 selector: { matchLabels: { app: netshoot } } template: metadata: labels: { app: netshoot } annotations: proxy.istio.io/config: | proxyStatsMatcher: inclusionRegexps: - ".*gslb.*" spec: dnsPolicy: None dnsConfig: nameservers: ["__LABDNS_IP__"] searches: # __CLUSTER_DOMAIN__ = setup.sh 가 클러스터 coredns 에서 - dns-lab.svc.__CLUSTER_DOMAIN__ # 자동 발견(이 클러스터는 homelab.local — cluster.local 아님). - svc.__CLUSTER_DOMAIN__ # 하드코딩하면 커스텀 도메인 클러스터에서 istiod resolve 실패 → - __CLUSTER_DOMAIN__ # sidecar XDS 불가 → Envoy 안 뜸(2026-07-01 실제 발생). options: - { name: ndots, value: "5" } containers: - name: netshoot image: nicolaka/netshoot:latest command: ["sh", "-c", "while true; do sleep 3600; done"]