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
NGINXENG JP#3 - 3-NGINX-Ingress-Controller-動作確認
Search
hiropo20
February 24, 2023
Technology
0
600
NGINXENG JP#3 - 3-NGINX-Ingress-Controller-動作確認
■NGINX-エンジニアリング勉強会#3
https://nginx-eng.connpass.com/event/274290/
その他のイベント資料や動画などイベントページをご覧ください。
hiropo20
February 24, 2023
Tweet
Share
More Decks by hiropo20
See All by hiropo20
NGINXENG JP#4 - 1-NGINX-エンジニアリング勉強会-きょうの見どころ
hiropo20
0
160
NGINXENG JP#4 - 3-NGINX-エンジニアリング勉強会-おわりに
hiropo20
0
160
NGINXENG JP#4 - 2-NGINX-Plusが提供する機能
hiropo20
0
190
NGINXENG JP LAB#1 - 1-NGINX-エンジニアリング勉強会-今日のみどころ
hiropo20
0
140
NGINXENG JP LAB#1 - 2-NGINXPlus-HandsOnTraining
hiropo20
0
150
NGINXENG JP LAB#1 - 3-NGINX-エンジニアリング勉強会-おわりに
hiropo20
0
120
NGINXENG JP#3 - 1-NGINX-エンジニアリング勉強会-きょうの見どころ
hiropo20
0
180
NGINXENG JP#3 - 2-NGINX-Ingress-Controller-の動作の詳細
hiropo20
0
370
NGINXENG JP#3 - 4-NGINX-エンジニアリング勉強会-おわりに
hiropo20
0
180
Other Decks in Technology
See All in Technology
リーダブルテストコード 〜メンテナンスしやすい テストコードを作成する方法を考える〜 #DevSumi #DevSumiB / Readable test code
nihonbuson
10
3.8k
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
4
1k
AWSでRAGを実現する上で感じた3つの大事なこと
ymae
3
960
偶然 × 行動で人生の可能性を広げよう / Serendipity × Action: Discover Your Possibilities
ar_tama
1
140
Datadogとともにオブザーバビリティを布教しよう
mego2221
0
120
組織貢献をするフリーランスエンジニアという生き方
n_takehata
1
280
依存関係があるコンポーネントは Barrel ファイルでまとめよう
azukiazusa1
3
510
エンジニアのためのドキュメント力基礎講座〜構造化思考から始めよう〜(2025/02/15jbug広島#15発表資料)
yasuoyasuo
2
220
急成長する企業で作った、エンジニアが輝ける制度/ 20250214 Rinto Ikenoue
shift_evolve
2
130
APIファーストで実現する運用性の高い IoT プラットフォーム: SORACOMのアプローチ
soracom
PRO
0
210
Ask! NIKKEI RAG検索技術の深層
hotchpotch
13
2.7k
バックエンドエンジニアのためのフロントエンド入門 #devsumiC
panda_program
16
5.3k
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
244
12k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Code Review Best Practice
trishagee
66
17k
YesSQL, Process and Tooling at Scale
rocio
171
14k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
11
940
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Being A Developer After 40
akosma
89
590k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
620
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Transcript
NGINX Ingress Controller 動作確認 Hiroshi Matsumoto
©2022 F5 2 動作環境
©2022 F5 3 操作するラボ環境 Windows GUI CLI RDP Node Node
Docker NGINX: Kubernetes_Lab_JP
©2022 F5 4 動作確認
©2022 F5 5 操作手順 1. NGINX Ingress Controller(NIC) 環境のセットアップ 1.
コンテナイメージの作成 2. NIC動作環境のセットアップの実行 2. サンプルアプリケーションのデプロイ 1. アプリケーション・設定のデプロイ 2. 動作確認・通信のログの確認 3. デプロイした内容の確認 1. Podのステータス確認 2. Pod内の各種確認
©2022 F5 6 1.NGINX Ingress Controller(NIC) 環境のセットアップ コンテナイメージ NGINX IC
ConfigFile nginx.conf file K8S Obj Process Kubernetes Cluster /etc/nginx /conf.d Admin https://docs.nginx.com/nginx-ingress-controller/intro/how-nginx-ingress-controller-works/ Linux (ubuntu) make コンテナ イメージの ビルド Linux (ubuntu) docker push コンテナイメージの PUSH repository NGINX Plusの取得 など 1 2 3 1.コンテナイメージの作成
©2022 F5 7 Namespace : nginx-ingress pod NGINX IC ConfigFile
nginx.conf Config Map Kubernetes Cluster /etc/nginx /conf.d Config Template File Log(stdout / stderr) https://docs.nginx.com/nginx-ingress-controller/intro/how-nginx-ingress-controller-works/ Linux (ubuntu) NIC Image 1.NGINX Ingress Controller(NIC) 環境のセットアップ file K8S Obj Process 2. NIC動作環境のセットアップの実行 NodePort 30080 HTTP 30443 HTTPS Admin Kubernetes API 1 CRDなど各種 ManifestのApply 2 Deployment Apply 3 NodePort Apply Manifest
©2022 F5 8 Namespace : nginx-ingress pod NGINX IC ConfigFile
nginx.conf Config Map Kubernetes Cluster /etc/nginx /conf.d Config Template File Log(stdout / stderr) https://docs.nginx.com/nginx-ingress-controller/intro/how-nginx-ingress-controller-works/ Linux (ubuntu) NIC Image 2.サンプルアプリケーションのデプロイ file K8S Obj Process 1.サンプルアプリケーション・設定のデプロイ NodePort 30080 HTTP 30443 HTTPS Admin Kubernetes API 1 SVCなど各種 ManifestのApply 2 Ingress Apply 3 VirtualServer Apply Namespace : service-a Namespace : service-b pod App ServiceA ServiceB Ingress a.xxx.com Config Config VirtualServer b.xxx.com Manifest pod App
©2022 F5 9 a. Curlコマンドの実行 2.サンプルアプリケーションのデプロイ 2.動作確認・通信のログの確認 • curl -H
"Host:cafe1.example.com" http://localhost/ • curl -H "Host:cafe2.example.com" http://localhost/ b. NICのログを確認 • kubectl logs <NIC POD> -n nginx-ingress Namespace : nginx-ingress pod NGINX IC ConfigFile nginx.conf Config Map Kubernetes Cluster /etc/nginx /conf.d Config Template File Log(stdout / stderr) NodePort 30080 HTTP 30443 HTTPS Kubernetes API Namespace : service-a Namespace : service-b pod App ServiceA ServiceB Ingress a.xxx.com Config Config VirtualServer b.xxx.com pod App 80 HTTP 443 HTTPS a b
©2022 F5 10 3.デプロイした内容の確認 1.Podのステータス確認 a. 確認コマンドの実行 • kubectl get
pods -n nginx-ingress • kubectl describe pods -n nginx-ingress | less Namespace : nginx-ingress pod NGINX IC ConfigFile nginx.conf Config Map Kubernetes Cluster /etc/nginx /conf.d Config Template File Log(stdout / stderr) NodePort 30080 HTTP 30443 HTTPS Kubernetes API Namespace : service-a Namespace : service-b pod App ServiceA ServiceB Ingress a.xxx.com Config Config VirtualServer b.xxx.com pod App 80 HTTP 443 HTTPS a
©2022 F5 11 3.デプロイした内容の確認 2.Pod内の各種確認 a. 確認コマンドの実行 • kubectl exec
-it <NIC POD> -n nginx-ingress -- ls -l /etc/nginx/conf.d/ • kubectl exec -it <NIC POD> -n nginx-ingress -- grep -v "^¥s*$" /etc/nginx/conf.d/default-cafe1-ingress.conf | less • kubectl exec -it <NIC POD> -n nginx-ingress -- grep -v "^¥s*$" /etc/nginx/conf.d/vs_default_cafe2.conf | less • 通信転送先となるUpstreamの情報、待ち受けるFQDNなど • kubectl exec -it <NIC POD> -n nginx-ingress -- grep -v "^¥s*$" /etc/nginx/nginx.conf | less • error_log、access_log設定 • kubectl exec -it <NIC POD> -n nginx-ingress -- bash Namespace : nginx-ingress pod NGINX IC ConfigFile nginx.conf Config Map Kubernetes Cluster /etc/nginx /conf.d Config Template File Log(stdout / stderr) NodePort 30080 HTTP 30443 HTTPS Kubernetes API Namespace : service-a Namespace : service-b pod App ServiceA ServiceB Ingress a.xxx.com Config Config VirtualServer b.xxx.com pod App 80 HTTP 443 HTTPS a
©2022 F5 12 まとめ
©2022 F5 13 操作手順 1. NGINX Ingress Controller(NIC) 環境のセットアップ 1.
コンテナイメージの作成 2. NIC動作環境のセットアップの実行 2. サンプルアプリケーションのデプロイ 1. アプリケーション・設定のデプロイ 2. 動作確認・通信のログの確認 3. デプロイした内容の確認 1. Podのステータス確認 2. Pod内の各種確認 デプロイ手順を 確認した デプロイ手順・ 動作を確認した NICの構成を確認した 各種設定を確認した NIC Processを確認した
None