Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
F5-NGINX-Ingress勉強会
Search
成臣 Chengchen
January 07, 2020
Programming
950
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
F5-NGINX-Ingress勉強会
成臣 Chengchen
January 07, 2020
More Decks by 成臣 Chengchen
See All by 成臣 Chengchen
ゲーム広告でのTiDB活用事例
it2911
0
300
ChaosBlade紹介[中国語]
it2911
0
280
Chaos Engineering 紹介[中国語]
it2911
0
350
Chaos Mesh紹介[中国語]
it2911
0
400
EKF日志分析平台架构方案实践
it2911
0
330
AWS云上架构演进
it2911
0
240
Ingress 勉強会: Traefik 2.0
it2911
0
480
JD.com Blockchain as a Service @ Tokyo in 2019
it2911
0
230
Kubernetes with JUJU
it2911
0
290
Other Decks in Programming
See All in Programming
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
240
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
100
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
230
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
3Dシーンの圧縮
fadis
1
770
net-httpのHTTP/2対応について
naruse
0
480
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
250
AI時代のUIはどこへ行く?その2!
yusukebe
21
7.1k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
280
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.6k
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Building an army of robots
kneath
306
46k
WCS-LA-2024
lcolladotor
0
630
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Why Our Code Smells
bkeepers
PRO
340
58k
We Have a Design System, Now What?
morganepeng
55
8.2k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Site-Speed That Sticks
csswizardry
13
1.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
840
Transcript
NGINX Ingress Controller F5ネットワークスジャパン合同会社 NGINX – テクニカルソリューションズアーキテクト 鈴木 孝彰
None
NGINX and NGINX Plus • NGINX – オープンソース, コミュニティ ◦
Web サーバーとコンテンツ キャッシュ ◦ レイヤー4/7 ロード バランシング ◦ 高負荷サイトはNGINXを選択してします ◦ DockerHubイメージ No1.ダウンロード • NGINX Plus – 商用版, F5ネットワークス ◦ 高度な機能と24x7サポート ◦ JWT 認証 ◦ 動的再構成用 NGINX PLUS REST API ◦ 動的 DNS 解決 ◦ アクティブヘルスチェック
MORE INFORMATION AT NGINX.COM • 下位互換性 – ALPN 使用、HTTP/1 と並んで
HTTP/2 をサポート (OpenSSL1.0.2 以降が必要です) • HTTP/2 ゲートウェイ– HTTP/2 を既存のアプリ サーバーが理解できるプロトコルに変換 NGINXをリバースプロキシとして利用する HTTP/3 *開発中 アプリケーション サーバ
NGINX OSS, NGINX Plus (商用版) WAF 機能 Web サーバ キャッシュ
ロード バランサ SSL リバース プロキシ 認証 ゲートウェイ API ゲートウェイ アプリケーション サーバ <··> <··> 5 OSS 商用 商用 商用 商用 商用 商用 OSS OSS OSS 商用 OSS Ingress Controller OSS Prometheus対応 Dashboard https://interact.f5.com/jp-products-nginxplus-acquisition.html https://docs.nginx.com/ ファイア ウォール
MORE INFORMATION AT NGINX.COM Kubernetes環境での利用 (Ingress Controller) https://github.com/nginxinc/kubernetes-ingress NGINX Plus
NGINX OSS NGINX Plusを入り口として Kubernetesアプリケーションを作成 • 高度な負荷分散とSSL/TLS 終端 • WebSocket と HTTP/2 のサポート • リクエストがアプリケーションに 転送される前にURI 書き換え • 設定変更 (Ingress, VS/VSR) • セッション維持 • JWT認証 • gRPC サポート • Prometheus/OpenTracingサポート • 24x7 商用サポート L4 L7
NGINX Ingress Controller 比較 機能等 kubernetes/ingress-nginx NGINX OSS + Lua
nginxinc/kubernetes-ingress NGINX OSS nginxinc/kubernetes- ingress NGINX Plus 開発者 Kubernetes コミュニティ F5 / NGINX Team,コミュニティ F5 / NGINX Team NGINX バージョン カスタム NGINX ビルド サードパーティモジュール 公式OSS NGINX (mainline) NGINX Plus (商用版) 商用サポート 無 無 有 Ingress対応 有 有 有 Annotations対応 有 有 有 ConfigMaps対応 有 有 有 TCP/UDP Extension対応 有 有 有 JSON Web Token認証 無 無 有 Prometheus/OpenTracing 対応 有 有 有 NGINX ダッシュボード 無 無 有
コンテナ環境でのベストプラクティス Ingress Kubernetes Cluster Ingress Kubernetes Cluster セキュリティ Attackers User
• アプリ開発者はアプリの開発に注力 • セキュリティはBIG-IPで統合処理 • SSLをBIG-IPで集中管理することで 証明書管理負荷の低減も可能
Public Cloudでの利用 https://cloud.google.com/community/tutorials/nginx-ingress-gke
Public Cloudでの利用 https://www.brandonbarnett.io/blog/2018/05/how-kubernetes-ingress-and-loadbalancer-resources-work-together/ https://docs.microsoft.com/ja-jp/azure/aks/ingress-basic
Public Cloudでの利用 https://cloud.ibm.com/docs/containers?topic=containers-ingress&locale=ja#user_managed https://www.nginx.com/partners/ibm/
Public Cloudでの利用 https://aws.amazon.com/blogs/opensource/network-load-balancer-nginx-ingress-controller-eks/
どのようにIngress利用するか?
Ingress Example – URL ベースのルーティング
NGINX Ingress Controller [URLベースルーティング] http://example.com/foo Upstream: foo-svc:80 NGINX Ingress Controller
http://example.com/bar Upstream: bar-svc:80
NGINX Ingress Controller [URLベースルーティング] http://example.com/foo Upstream: foo-svc:80 NGINX Ingress Controller
http://example.com/bar Upstream: bar-svc:80 http://example.com/HelloWorld.Greeter Upstream: grpc-svc:5001 http://example.com/ws Upstream: ws-svc:8008
Ingress Example – [ホストベースのルーティング]
NGINX Ingress Controller [ホストベースルーティング] http://foo.example.com/ Upstream: foo-service:80 http://bar.example.com/ Upstream: bar-service:80
NGINX Ingress Controller
MORE INFORMATION AT NGINX.COM Kubernetes IngressでのNGINX関連設定 Annotations ConfigMap https://github.com/nginxinc/kubernetes- ingress/blob/master/docs/configmap-and-annotations.md
• AnnotationsはConfigMapよりも優先されます。
Route Resource *お持ちのNGINXコンフィグをserver/locationブロックに追加していただけます。 Annotations: server-snippets, location-snippets server { listen <parameters>;
location <url> { ---------------- } } upstream { ------------------- } server { listen <parameters>; location <url> { ---------------- } } upstream { ------------------- } nginx-service.conf server { listen <parameters>; location <url> { ---------------- } } upstream { ------------------- }
NGINX Plusだと使える機能ある?
Ingress Example – セッション維持 NGINX Ingress Controller https://cafe.example.com/v1.0 Upstream: v1-service:80
Upstream: v1-service:80 NGINX Plus Cookie NGINX Ingress Controller
Ingress Example – Active Health Check NGINX Ingress Controller https://cafe.example.com/v1.0
Upstream: v1-service:80 NGINX Plus Header: Content-Type = text/html Body: ”Welcome to nginx!” NGINX Ingress Controller
Ingress Example – JWT/OpenID認証 NGINX Ingress Controller https://cafe.example.com/v1.0 Upstream: v1-service:80
Upstream: v1-service:80 NGINX Plus JWT 認証 NGINX Ingress Controller
Ingress Example - External Name NGINX Ingress Controller https://cafe.example.com/v2.0 Upstream:
v1-service:80 https://cafe.example.com/v1.9 Service Type: ExternalName ec2-3-112-127-6.ap-northeast-1.compute.amazonaws.com:80 NGINX Plus Ingress Kubernetes Cluster Amazon EC2 Elastic Beanstalk AWS Fargate Amazon S3
Ingress Example - External Name NGINX Ingress Controller https://cafe.example.com/v2.0 Upstream:
v1-service:80 https://cafe.example.com/v1.9 Service Type: ExternalName old-api.nginx.co.jp NGINX Plus Ingress Kubernetes Cluster オンプレ環境 • 物理FW/LB • 物理サーバ/ストレージ
NGINX Custom Resources?
NGINX Custom Resources 設定変更 VirtualServer VirtualServerRoute apiVersion: k8s.nginx.org/v1 kind: VirtualServer
metadata: name: vs spec: host: virtual.example.com tls: secret: cafe-secret upstreams: - name: tea service: tea-svc port: 80 routes: - path: /aaa upstream: tea - path: /ccc route: default/ccc 新しいL7ルーティング構成のご提案です。 トラフィック分割や高度なコンテンツ ベースのルーティングなど、 Ingressでサポートされていないユース ケースが有効になります。 Custom Resources of NGINX
Custom Resources: URLベースルーティング http://example.com/foo Upstream: foo-service:80 Upstream: bar-service:80 Virtual Server
http://example.com/bar
Custom Resources: ホストベースルーティング http://foo.example.com/ Upstream: foo-service:80 Upstream: bar-service:80 NGINX Ingress
Controller http://bar.example.com/ Virtual Server
CustomResources 設定例 (Request Method) https://example.com/app/ Upstream: Backend-A Upstream: Backend-B GET
POST VirtualServer VirtualServerRoute
CustomResources 設定例 (Weight) https://example.com/app/ weight:90 weight:10 Upstream: Backend-Stable Upstream: Backend-Canary
VirtualServer VirtualServerRoute
Micro Services, Service Mesh, Now What?
MORE INFORMATION AT NGINX.COM サイドカーアーキテクチャ • アウトバウンド ロードバランシング • サービスディスカバリー
• 認証/認可 • SSL ターミネーション(mTLS)
MORE INFORMATION AT NGINX.COM Red Hat OpenShift Service Mesh (Istio)
Config設定 Policy管理 mTLS 証明書管理 サービス間通信
MORE INFORMATION AT NGINX.COM • 下位互換性 – ALPN 使用、HTTP/1 と並んで
HTTP/2 をサポート (OpenSSL1.0.2 以降が必要です) • HTTP/2 ゲートウェイ– HTTP/2 を既存のアプリ サーバーが理解できるプロトコルに変換 NGINXをリバースプロキシとして利用する HTTP/3 *開発中 アプリケーション サーバ
まとめ - NGINX Ingress Controllerを様々なk8s環境(GKE, AWS, Azure)で利用できます. - 既存NGINX Configをk8s環境へ持ち込んでいただけます.
- 柔軟なリバースプロキシ (GKE→AWS/物理) - F5 NetworksによりNGINXを作成しているチームが商用サポートします.
ありがとうございました. Thank you!