Skip to content

Instantly share code, notes, and snippets.

@apstndb
Last active September 26, 2019 07:18
Show Gist options
  • Save apstndb/a347932d0dbd67c470389635d303a08a to your computer and use it in GitHub Desktop.
Save apstndb/a347932d0dbd67c470389635d303a08a to your computer and use it in GitHub Desktop.

Follow official gRPC example https://knative.dev/docs/serving/samples/grpc-ping-go/

GCP_PROJECT="your-own-project"

git clone -b "release-0.9" https://github.com/knative/docs knative-docs
cd knative-docs/docs/serving/samples/grpc-ping-go
gcloud builds submit --tag "gcr.io/${GCP_PROJECT}/grpc-ping-go"
gcloud beta run deploy --image=gcr.io/${GCP_PROJECT}/grpc-ping-go --allow-unauthenticated --platform=managed --region=asia-northeast1 grpc-ping
DOMAIN="$(gcloud beta run services describe --platform=managed --region=asia-northeast1 --format="value(status.url)" grpc-ping | sed 's!https://!!')"
docker run --rm "gcr.io/${GCP_PROJECT}/grpc-ping-go" /client -server_addr="${DOMAIN}:443"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment