Apigee Hybrid 管理層通常會透過 Apigee Connect,與執行階段層中的 MART 服務通訊。這是建議設定。不過,如果您想使用 MART Istio Ingress 閘道服務,而非 Apigee Connect,則需要將 MART 端點公開給來自叢集外部的要求。MART 端點是安全的 TLS 連線。Hybrid 會使用 Istio 輸入閘道服務,將流量公開至這個端點。
本主題說明如何公開 MART 端點。
新增 MART 服務帳戶
MART 需要 GCP 服務帳戶才能進行驗證。
- 在 GCP 設定步驟中,您新增服務帳戶,並為 MART 建立沒有任何角色的服務帳戶。找出您為該服務帳戶下載的金鑰檔案。
檔案應使用
.json副檔名。 - 將金鑰檔案路徑新增至
mart.serviceAccountPath屬性:... mart: sslCertPath: sslKeyPath: hostAlias: serviceAccountPath: "path to a file" ...
例如:
... mart: sslCertPath: sslKeyPath: hostAlias: serviceAccountPath: "your_keypath/mart-service-account.json ...
新增 TLS 憑證和主機別名
- 開啟覆寫檔案。
- 新增
mart.sslCertPath、mart.sslKeyPath和mart.hostAlias屬性。下表說明這些屬性:屬性 值 mart.sslCertPath
mart.sslKeyPathMART 憑證/金鑰組必須由憑證授權單位 (CA) 授權。 如果您先前未建立授權憑證/金鑰配對,現在必須建立,並輸入相應屬性值的憑證和金鑰檔案名稱。如需產生授權憑證/金鑰組的相關說明,請參閱「取得傳輸層安全標準 (TLS) 憑證:範例」。 mart.hostAlias。(必要) MART 伺服器端點的合格 DNS 名稱。例如: foo-mart.mydomain.com。舉例來說,主機別名是合格網域名稱:
... mart: sslCertPath: path-to-file/mart-server.crt sslKeyPath: path-to-file/mart-server.key hostAlias: foo-mart.mydomain.com serviceAccountPath: "your_keypath/mart-service-account.json ...
- 儲存變更。