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?

GKE ingressでEmpty reply from serverが出たとき

Posted at

何が起きたか

GKEにingressをデプロイし、IPアドレスがアサインされた後、curlでリクエストを送ったところ、エラーが発生した。

% k describe ingress my-ingress
Name:             my-ingress
Labels:           <none>
Namespace:        default
Address:          34.98.64.104
Ingress Class:    <none>
Default backend:  <default>
Rules:
  Host        Path  Backends
  ----        ----  --------
  *           
              /*   nginx:80 (<none>)
Annotations:  ingress.kubernetes.io/backends:
                {"k8s1-150937ce-default-nginx-80-497f3411":"Unknown","k8s1-150937ce-kube-system-default-http-backend-80-615fa400":"HEALTHY"}
              ingress.kubernetes.io/forwarding-rule: k8s2-fr-wyu1g3bu-default-my-ingress-etd1ul6o
              ingress.kubernetes.io/target-proxy: k8s2-tp-wyu1g3bu-default-my-ingress-etd1ul6o
              ingress.kubernetes.io/url-map: k8s2-um-wyu1g3bu-default-my-ingress-etd1ul6o
Events:
  Type    Reason     Age                  From                     Message
  ----    ------     ----                 ----                     -------
  Normal  Sync       87s                  loadbalancer-controller  UrlMap "k8s2-um-wyu1g3bu-default-my-ingress-etd1ul6o" created
  Normal  Sync       84s                  loadbalancer-controller  TargetProxy "k8s2-tp-wyu1g3bu-default-my-ingress-etd1ul6o" created
  Normal  Sync       69s                  loadbalancer-controller  ForwardingRule "k8s2-fr-wyu1g3bu-default-my-ingress-etd1ul6o" created
  Normal  IPChanged  68s                  loadbalancer-controller  IP is now 34.98.64.104
  Normal  Sync       63s (x4 over 3m53s)  loadbalancer-controller  Scheduled for sync
% curl 34.98.64.104
curl: (52) Empty reply from server

Ingressはいろいろなエラーが発生する割にGoogleCloud側にトラブルシュート用の資料がなく、毎回原因の究明に苦労するので、今回のケースについて記録しておく。

原因

ロードバランサのデプロイが終わってなかった。しばらく待ってからリクエストを投げると今度は違うレスポンスが帰ってきた。
見かけ上IPがアサインされ、Eventsにエラーがなくsyncになっていても、実際はリクエストをまだ受け付けられない可能性がある。

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?