LoginSignup
0
0

More than 3 years have passed since last update.

client -> AWS NLB -> kubernetes ingress-nginx -> podsでclientのIPをログで確認できるか

Posted at

本日の課題

ingress-nginxのログではClient IPが確認できるけどバックエンドアプリの走ってるpodのログではこれがingress-nginxのIPになってる件。
ingress-nginxを見ればいい話だけど、"Nice to have" featureなので調べてと頼まれた。

Spec
AWS NLB
Kubernetes - ingress-nginx

Diagram
簡略化したもの
Screenshot 2019-08-01 at 22.57.54.png

設定
この設定がされている上で調べることに。

spec:
# this setting is to make sure the source IP address is preserved.
externalTrafficPolicy: Local
type: LoadBalancer

結局
「今現在では」できない

issues/3857で確認できます。
Proxy protocol is not available in NLBs. Please check kubernetes/kubernetes#57250

workaround
フロントエンドアプリのログでは確認できてるのでログフォーマットで見ることができる。

Resources

Kubernetes Official Document

AWS Official Document

github

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