瞭解 Cloud Service Mesh API 資源
在 GKE 上使用 Gateway API 和 Istio API 設定服務網格時,您在 GKE 上管理的 KRM 型 API 資源會自動轉換為一組 Google Cloud API 資源:
- 不會向您收取額外費用。
- 這些資源完全由代管 Cloud Service Mesh 基礎架構管理(根據您在 GKE 叢集中建立的 API 資源)。您無法修改或刪除這些 Google Cloud API 資源。KRM API 的變更會觸發對應 Google Cloud API 資源的更新或移除作業。取消佈建 Cloud Service Mesh 服務網格時,系統會自動移除Google Cloud API 資源。
- 這些資源在功能上與您在 GKE 上管理的 API 資源相同。Cloud Service Mesh 基礎架構會根據這些 Google Cloud API 資源,在 GKE 叢集中設定資料層。
- 這些要求須遵守標準 Google Cloud API 配額控制。您可以在 Google Cloud 專案中查看目前的配額用量。如果超過 Google Cloud 資源配額,設定傳播至資料平面就會停滯。請注意, Google Cloud 會在專案層級強制執行資源配額,而這些 Google Cloud API 資源會與您自行管理的同類型 Google Cloud API 資源共用配額。
以下是 GKE 上的 API 資源如何對應至 Google Cloud API 資源的高階總覽。在大多數情況下,您不需要瞭解 API 對應,即可在 GKE 上使用服務網格,因為您將使用 Gateway API 或 Istio API 管理 GKE 上的服務網格。另一方面,深入瞭解 API 對應有助您在服務網格擴充時,更有效率地規劃及管理Google Cloud API 配額。
瞭解 API 資源
您在 GKE 上管理的 API 資源會對應至一組 Google Cloud API 資源,這些資源可控制資料平面中流量行為的各個層面。建議您為這些資源設定配額快訊。
搭配代管 Cloud Service Mesh 使用 Istio API
| 項目 | Istio API 資源 | Google Cloud API 資源 | 範圍 | 配額與限制 | 上限 |
|---|---|---|---|---|---|
| 流量轉送 | VirtualService |
HTTPRoute TCPRoute TLSRoute |
全球 |
HTTPRoute 配額 TCPRoute 配額 TLSRoute 配額 |
每個服務通訊埠各 1 個,以及每個 Istio VirtualService HTTPRoute、TCPRoute 和 TLSRoute 各 1 個。 |
| 服務代表(適用於路徑 / 政策附加) |
Service ServiceEntry |
BackendService | 全球 | BackendService 配額 | 每個服務通訊埠 1 個 (包括 Istio ServiceEntry)。 |
| 工作負載屬性(例如 IP:port、地區) |
Service ServiceEntry |
NetworkEndpointGroup | 可用區 | NetworkEndpointGroup 配額 | 每個 (服務通訊埠、可用區) 各 1 個。在地區性 GKE 叢集中,如果叢集在特定區域中至少有一個節點,系統就會為該區域的特定服務通訊埠建立 NetworkEndpointGroup。 |
| 工作負載健康狀態監控 | 服務 | HealthCheck | 全球 | 健康檢查配額 | 每個 GKE 叢集 1 個。 |
| 工作負載政策附加點 |
PeerAuthentication AuthorizationPolicy RequestAuthentication EnvoyFilter |
EndpointPolicy | 全球 | EndpointPolicy 配額 | 每個服務通訊埠和每個工作負載政策各 1 個。 |
| 驗證 | PeerAuthentication |
ClientTlsPolicy ServerTlsPolicy |
全球 |
ClientTlsPolicy 配額 ServerTlsPolicy 配額 |
每個服務通訊埠 1 個 ClientTlsPolicy。每個 TLS 閘道各 1 項 ServerTlsPolicy。 |
| 授權 | AuthorizationPolicy | HttpFilter | 全球 | HttpFilter 配額 | 每個 Istio AuthorizationPolicy 各 1 個 |
| 閘道 | 閘道 | 閘道 | 全球 | 閘道配額 | 每個 Istio 閘道伺服器通訊埠 1 個 |
| 流量分配政策 | GCPTrafficDistributionPolicy 1 | ServiceLbPolicy | 全球 | ServiceLbPolicy 配額 | 每個 GCPTrafficDistributionPolicy 1 個 |
如果服務網格涵蓋不同專案中的多個叢集,所有Google Cloud 資源都會在機群專案中建立。
1GCPTrafficDistributionPolicy 不是 Istio API。並強化 Istio API,提供進階流量管理功能。
搭配代管 Cloud Service Mesh 使用 Kubernetes Gateway API
| 項目 | Kubernetes Gateway API 資源 | Google Cloud API 資源 | 範圍 | 配額與限制 | 上限 |
|---|---|---|---|---|---|
| 流量轉送 |
HTTPRoute GRPCRoute |
HTTPRoute GRPCRoute |
全球 |
HTTPRoute 配額 GRPCRoute 配額 |
每個服務通訊埠各 1 個,以及每個 HTTPRoute 和 GRPCRoute 各 1 個。 |
| 服務代表(適用於路徑 / 政策附加) | 服務 | BackendService | 全球 | BackendService 配額 | 每個由 HTTPRoute 和 GRPCRoute 附加的服務通訊埠各 1 個。 |
| 工作負載屬性(例如 IP:port、地區) | 服務 | NetworkEndpointGroup | 可用區 | NetworkEndpointGroup 配額 | 每個 (服務通訊埠、區域) 各 1 個。在地區性 GKE 叢集中,只要叢集在特定區域中至少有一個節點,系統就會在該區域中為特定服務通訊埠建立 NetworkEndpointGroup。 |
| 工作負載健康狀態監控 | 服務 | HealthCheck | 全球 | 健康檢查配額 | 每個由 HTTPRoute 和 GRPCRoute 附加的服務通訊埠各 1 個。 |