1

是否可以在后端服务 (https) 创建期间将其附加到 http 健康检查?

我问这个是因为如果我手动尝试(谷歌云网络控制台),我就能做到。

我的脚本如下:

gcloud compute http-health-checks create my-health-check --port 80 \
--host <my host goes here> \
--project "$PROJECT"`enter code here`

gcloud compute backend-services create my-bs \
--http-health-checks my-health-check \
--protocol HTTPS \
--timeout 5m \
--project "$PROJECT" \
--global

我收到以下错误:

This HTTPS/HTTP2 backend service supports HealthCheck and HttpsHealthCheck

但如果我手动创建它,谷歌(网络控制台)允许我。

4

1 回答 1

1

I found the solution:

gcloud compute health-checks create http my-health-check --port 80 --host my-url --project "$PROJECT" 

gcloud compute backend-services create bs --health-checks my-health-check --protocol HTTPS --timeout 5m --project "$PROJECT" --global 
于 2018-07-20T20:41:59.647 回答