[英]How to run a GCP Cloud run that calls another GCP Cloud Run for data
我在同一 VPC/項目中有兩個雲運行,其中一個雲運行 (A) 根據另一個雲運行 (B) 的請求輸出構建請求。
我通過在雲運行 (A) 的.env
中提供雲運行 (B) 的觸發 URL 從雲運行 (A) 調用雲運行 (B)。
我收到的curl
錯誤是“系統不可用”。 來自雲運行的錯誤日志是:
POST 503
"The request failed because either the HTTP response was malformed or connection to the instance had an error. Additional troubleshooting documentation can be found at: https://cloud.google.com/run/docs/troubleshooting#malformed-response-or-connection-error"
日志顯示雲運行 (A) 正在成功調用另一個雲運行 (B)。 但請求最多需要 60-120 秒,直到雲運行 (A) 生成響應。 為了安全起見,我在雲運行 (A) 上將請求超時設置為 10 分鍾,但在雲運行 (A) 上仍然面臨錯誤。
設置兩個雲運行時唯一使用的特定於網絡的非默認設置是“Ingress=Internal+load balancing”。
此設置適用於原始參考雲運行 (B),從運行相同圖像+容器設置的 GCE VM 服務器發送請求。
我需要什么雲運行設置才能讓一個雲運行能夠正確地從另一個雲請求數據?
我通過其觸發器 url 從另一個雲運行和虛擬機服務器引用雲運行:
cat.env
URL=https://<name>.a.run.app
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.