Istio Egress Gateway 与外部服务访问控制(TLS Origination、SNI 与出口策略)概述Egress Gateway 将集群对外访问集中经过网关,实现可观测与安全合规。TLS Origination 在网关处终止并开启到外部的 TLS。关键实践与参数出口策略:`meshConfig.outboundTrafficPolicy` 与 `ServiceEntry` 明确允许的外部域与端口。TLS Origination:`VirtualService` 到 Egress Gateway,再由 `DestinationRule` 配置到外部的 TLS。SNI:设置外部域名的 SNI;证书校验与 CA 配置。配置示例(片段)apiVersion: networking.istio.io/v1alpha3

kind: ServiceEntry

spec:

hosts: ["api.external.com"]

ports: [{ number: 443, name: https, protocol: TLS }]

location: MESH_EXTERNAL

---

kind: VirtualService

spec:

hosts: ["api.external.com"]

gateways: ["istio-egressgateway"]

tls:

- match: [{ sniHosts: ["api.external.com"] }]

route: [{ destination: { host: istio-egressgateway.istio-system.svc.cluster.local, port: { number: 443 } } }]

---

kind: DestinationRule

spec:

host: istio-egressgateway.istio-system.svc.cluster.local

trafficPolicy:

tls:

mode: ISTIO_MUTUAL

验证方法通过网关访问外部服务并抓包/日志验证 SNI 与 TLS 行为。审计允许列表命中与拒绝事件;对比稳定性与延迟。故障演练:证书更新与失效、外部不可用时的降级。注意事项严格的允许清单与审计;避免外连扩散。证书与 CA 管理;自动更新与告警。与出口 NAT 与网络策略一致,避免冲突。

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部