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
Traffic Management with Istio ( with Demo )
Search
loftkun
August 08, 2019
Technology
0
570
Traffic Management with Istio ( with Demo )
2019/08/08 Thu
Cloud Native FUKUOKA #02 - connpass
https://cnjp.connpass.com/event/139837/
loftkun
August 08, 2019
Tweet
Share
More Decks by loftkun
See All by loftkun
OpenShiftのリリースノートを整理してみた
loftkun
2
2.4k
OpenShiftのサポートを始めるぞ!高頻度で更新されるOSSを効果的にキャッチアップする仕組みを考えました!
loftkun
1
2.3k
Demo of write slides and books with VSCode + Markdown
loftkun
1
680
Write slides and books in VSCode + Markdown
loftkun
5
2.3k
OpenShift from Easy way to Hard ? Way
loftkun
1
1.7k
Kubernetes The Hard Way をやってみた
loftkun
2
520
Operator reading and writing with Operator SDK
loftkun
1
300
HPA with custom metrics
loftkun
1
2k
Getting Started with Graph Database with Python
loftkun
1
640
Other Decks in Technology
See All in Technology
アセスメントで紐解く、10Xのデータマネジメントの軌跡
10xinc
1
430
4/16/25 - SFJug - Java meets AI: Build LLM-Powered Apps with LangChain4j
edeandrea
PRO
1
100
はてなの開発20年史と DevOpsの歩み / DevOpsDays Tokyo 2025 Keynote
daiksy
6
1.5k
AWS全冠芸人が見た世界 ~資格取得より大切なこと~
masakiokuda
5
5.9k
“パスワードレス認証への道" ユーザー認証の変遷とパスキーの関係
ritou
1
570
AWSのマルチアカウント管理 ベストプラクティス最新版 2025 / Multi-Account management on AWS best practice 2025
ohmura
4
290
ブラウザのレガシー・独自機能を愛でる-Firefoxの脆弱性4選- / Browser Crash Club #1
masatokinugawa
1
460
4/17/25 - CIJUG - Java Meets AI: Build LLM-Powered Apps with LangChain4j (part 2)
edeandrea
PRO
0
100
Spring Bootで実装とインフラをこれでもかと分離するための試み
shintanimoto
7
810
技術者はかっこいいものだ!!~キルラキルから学んだエンジニアの生き方~
masakiokuda
2
260
Goの組織でバックエンドTypeScriptを採用してどうだったか / How was adopting backend TypeScript in a Golang company
kaminashi
6
5.4k
[2025年4月版] Databricks Academy ラボ環境 利用開始手順 / Databricks Academy Labs Onboarding
databricksjapan
0
130
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
GraphQLとの向き合い方2022年版
quramy
46
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
Done Done
chrislema
183
16k
The Pragmatic Product Professional
lauravandoore
33
6.5k
What's in a price? How to price your products and services
michaelherold
245
12k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
119
51k
GraphQLの誤解/rethinking-graphql
sonatard
71
10k
Building Flexible Design Systems
yeseniaperezcruz
329
38k
Transcript
Traffic Management with Istio ( with Demo ) 2019/08/08 Cloud
Native FUKUOKA #02 loftkun
About me • @loftkun • ヤフー株式会社 SRE部 • 将棋好き •
対局結果検索サイトなど公開してます • ⾳楽好き • ROCK IN JAPAN FESTIVAL ⾏きます • ピアノ習いたい • コンテナ好き、k8sは前職で使ってた、現職でも使いたい
My k8s Environment
Machine CPU Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz 6Core/12Threads RAM
64GB OS Ubuntu 17.10 k8s minikube v1.2.0 ( Kubernetes v1.15.0 ) assign 12cpu & 40GB RAM kubectl v1.15.0 istio v1.2.2 helm v2.14.1
minikube start vm-driver=virtualbox Container VM ( Node ) Minikube BareMetal
ssh -fNL 12345:192.168.99.100:12345
[email protected]
192.168.3.5 grafana service のnodePortが12345の場合 http://localhost:12345 でアクセスできるぞ 192.168.99.100 192.168.3.4 Minikube ssh でログイン可能
minikube start vm-driver=none Container Minikube BareMetal 192.168.3.5 ( Node )
grafana service のnodePortが12345の場合 http://192.168.3.5:12345 でアクセスできるぞ 192.168.3.4 tcpdump –i docker0 全Pod間の通信をキャプチャできるぞ
Agenda Introduction How to use Bookinfo Traffic Management
Introduction What is Istio?
https://istio.io/ • サービスメッシュを構成するOSS • CNCF Platinum Member • Proxyコンテナ(Envoy)をSidecarとしてPod内にInjectionしてくれる •
様々な制御をkubectl applyできる(後ほどご紹介) • 便利なOSS同梱 • メトリクス (Prometheus/Grafana) • トレース (Jaeger/Zipkin) • サービスメッシュグラフの可視化(Kiali)
https://github.com/cncf/trailmap
https://github.com/cncf/trailmap
How to use Install à Sidecar Injection à Apply traffic
rules
3 steps Install Sidecar Injection Apply traffic rules
Install Use Helm? $ kubectl apply istio-demo.yaml Cluster has tiller?
$ helm template istio | kubectl apply $ helm install istio Y Y おすすめはHelm使⽤。パラメタ設定が楽。 • incubator/istioはメンテが⽌まってるので使わない • istio.ioのdoc記載の最新版をdownloadして使おう N N
Sidecar Injection Manual istioctl kube-injectコマンドでSidecarを埋め込んだmanifestを出⼒する $ kubectl apply -f <
( istioctl kube-inject -f my-manifests.yaml ) Automatic 対象のnamespaceにラベルを設定しておくだけでOK! $ kubectl label ns my-ns istio-injection=enabled
Apply traffic rules kubectl apply –f my-virtualservice.yaml • VirtualService •
a set of traffic routing rules • 宛先別に様々なruleを設定できる Istio setup is done, Letʼs Traffic Management !
Bookinfo Istioが提供するサンプルアプリ
Architecture https://istio.io/docs/examples/bookinfo/ load balancing ( by reviews service )
Demo
Traffic Management Routing, Fault Injection, etc
Request Routing https://istio.io/docs/examples/bookinfo/
Demo
review v1 (星なし)
Request Routing ( by header ) https://istio.io/docs/examples/bookinfo/
Demo
None
Canary Release に使えそう︕ review v2 (⿊い星)
Fault Injection (delay ) Injected Delay : 7sec https://istio.io/docs/examples/bookinfo/
Demo
None
https://istio.io/docs/examples/bookinfo/
hard-corded Timeout : 10sec Injected Delay : 7sec https://istio.io/docs/examples/bookinfo/
hard-corded Timeout : 3sec Retry : 1 hard-corded Timeout :
10sec Injected Delay : 7sec Chaos Engineering に使えそう︕ https://istio.io/docs/examples/bookinfo/
None
Other Traffic Managements • Traffic Shifting • Circuit Breaking •
Mirroring and more ! https://istio.io/docs/tasks/traffic-management/
Appendix
なぜヨット︖
いろいろ船関連だった Kubernetes 操舵手(ギリシャ語) Helm 舵 tiller 舵柄(かじを操作するレバー) Istio 帆(ギリシャ語) Spinnaker
大きな三角形の帆
Thank you for listening ! 福岡新着ITイベント @ITEventFukuoka
Appendix : commands for demo with my home k8s
ssh config • ~/.ssh/config • ログイン ssh my-k8s
ssh port forwarding INGRESS_HOST=192.168.99.100 INGRESS_PORT=31380 ssh -fNL ${INGRESS_PORT}:${INGRESS_HOST}:${INGRESS_PORT} my-k8s •
ローカルの31380ポートをnode(MinikubeのVM) 内の 31380ポートにforwarding • BookInfoは localhost:31380/productpage で⾒れる
ref • Request Routing • https://istio.io/docs/tasks/traffic-management/request-routing/ • Fault Injection •
https://istio.io/docs/tasks/traffic-management/fault-injection/
Appendix : BookInfo screenshot
review v1のレスポンス
reload
None
review v2のレスポンス(⿊い星)
reload
None
review v3のレスポンス(⾚い星)