我無法在線查找有關如何在Gcloud端點中運行多個端點的信息。是否可以通過一個Gcloud可擴展服務器代理服務多個端點
在Gcloud端點例子中,只描述瞭如何設置,供應1個端點的ESP,我設法得到它的工作
spec:
containers:
- name: esp
image: gcr.io/endpoints-release/endpoints-runtime:1
args: [
"-P", "9000",
"-s", "SERVICE_NAME",
"-v", "SERVICE_CONFIG_ID",
"-a", "grpc://127.0.0.1:8000"
]
ports:
- containerPort: 9000
- name: bookstore
image: gcr.io/endpointsv2/python-grpc-bookstore-server:1
ports:
- containerPort: 8000
我打開4個GRPC端點的容器。 我嘗試了以下配置:但它似乎沒有按預期工作。 容器:
- name: platform
image: gcr.io/platform-100007/platform:latest
ports:
- containerPort: 8002
- containerPort: 8005
- containerPort: 8011
- containerPort: 8008
- name: esp
image: gcr.io/endpoints-release/endpoints-runtime:1
args: [
"-P", "9005",
"-a", "grpc://127.0.0.1:8005",
"-P", "9002",
"-a", "grpc://127.0.0.1:8002",
"-P", "9011",
"-a", "grpc://127.0.0.1:8011",
"-P", "9008",
"-a", "grpc://127.0.0.1:8008",
"-s", "testgrpc.endpoints.platform-100007.cloud.goog",
"-v", "2017-10-09r0",
]
ports:
- containerPort: 9005
- containerPort: 9002
- containerPort: 9011
- containerPort: 9008
服務:
apiVersion: v1
kind: Service
metadata:
name: platform
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 9002
nodePort: 30082
name: "grpc"
- protocol: TCP
port: 9005
nodePort: 30085
name: "8005"
- protocol: TCP
port: 9011
nodePort: 30811
name: "8011"
- protocol: TCP
port: 9008
nodePort: 30808
name: "flow"
selector:
run: platform
當我看到[啓動] [1]的選擇https://cloud.google.com/endpoints/docs/grpc/specify-proxy-startup-options
例如-P HTTP2_PORT --http2_port HTTP2_PORT Sets the ports to be exposed by the proxy for HTTP/2 connections.
因爲它在這裏使用ports
所以我認爲它必須是一種配置代理服務多個後端服務的方式,但是我找不到任何相關文檔。