0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GKEでgRPCを使うチュートリアルでconnection refused エラー

Last updated at Posted at 2019-07-02

GKEでgRPCを使うチュートリアルを進めていたら、GKEにデプロイする部分で変にハマってしまったのでメモ。

チュートリアルはこちら。

Getting started with gRPC on GKE
https://cloud.google.com/endpoints/docs/grpc/get-started-kubernetes-engine

Google Cloud Endpoints Sample for Go using gRPC
https://github.com/GoogleCloudPlatform/golang-samples/tree/master/endpoints/getting-started-grpc

デプロイコマンドはこちら。

kubectl apply -f deployment.yaml

エラー内容は以下

unable to recognize "deployment.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused

わかる人は見た瞬間に分かるかもっていうエラーです。

「deployment.yamlが認識できません」的な表現ばかりに気を取られて最後の「接続が拒否されました」あたりをあまりよく読んでなかったせいで、yamlを見直したりして少し悩みました。

localhost:8080にうんたら部分がよく分からんかったというのもある。

結局、このチュートリアル前に一回GKEのクラスタを作り直したせいで一回通したはずの認証情報が入ってなかったというオチでした。要するに認証エラーで接続拒否されてただけ。

gcloud container clusters get-credentials [CLUSTER_NAME] --zone [ZONE_NAME]

ということで上記のコマンドで解決。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?