Model Armor 可通过 Service Extensions 与 Google Kubernetes Engine (GKE) 集成。借助 Service Extensions,您可以向网络流量处理路径添加自定义逻辑。流量扩展程序是一种特定类型的 Service Extensions,可让您集成外部服务以处理流量。这些扩展程序可以附加到各种 Google Cloud 服务(包括负载均衡器)。您可以在应用负载均衡器(包括 GKE 推断网关)上配置服务扩展程序,以筛查进出 GKE 集群的流量。这可确保与 AI 模型的所有交互都受 Model Armor 保护。如需了解详情,请参阅配置流量扩展程序以调用 Model Armor 服务。
工作原理
您可以在将流量路由到 GKE 集群中托管的 LLM 的负载均衡器上配置 Service Extensions。此配置指定应使用 Model Armor 来过滤提示和响应。
当提示和响应到达负载均衡器时,Service Extensions 会调用 Model Armor 服务。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[],[],null,["| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nModel Armor can be integrated with Google Kubernetes Engine (GKE) through\n[Service Extensions](/service-extensions/docs/integration-with-google-services).\nService Extensions allow you to add custom logic to network traffic\nprocessing paths. Traffic extensions are a specific type of service extensions\nthat let you integrate external services to process traffic. These extensions\ncan be attached to various Google Cloud services, including load balancers.\nYou can configure a service extension on application load balancers, including\n[GKE inference gateways](/kubernetes-engine/docs/concepts/about-gke-inference-gateway),\nto screen traffic to and from a GKE cluster. This ensures that\nall interactions with the AI models are protected by Model Armor. For\nmore information, see [Configure a traffic extension to call a Model Armor service](/service-extensions/docs/configure-extensions-to-google-services#configure-traffic-ma).\n\nHow it works\n\n1. You configure a service extension on a load balancer that routes traffic to an LLM hosted in your GKE cluster. This configuration specifies that Model Armor should be used to screen prompts and responses.\n2. When prompts and responses reach the load balancer, the service extension calls the Model Armor service.\n3. Model Armor then applies security policies to the prompts and responses, identifying and blocking any malicious or harmful content.\n4. Only prompts and responses that pass the Model Armor checks are allowed through to the GKE cluster or back to you."]]