Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Istio
Search
Masaki Iino
February 09, 2018
Technology
1.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Istio
AnyPay社内LT用資料
Istioの簡単な説明とBookinfoを使ったrouting変更のデモを載せています
Masaki Iino
February 09, 2018
Transcript
20 slides
Istio 2018/02/09 Iino Masaki
Istio IstioはK8sと同様にCNCFがホストする OSSであり、マイクロサービスにおける複 雑なネットワークで発生する課題を解決 する 主な機能 • ロードバランシング • 動的なルーティング
• リトライ制御 • サーキットブレイカー • サービス間認証 • モニタリング... https://istio.io/
Traffic Management Istioを使うとこんなことができる 図の上部①と② 1. Pod1~3へのラウンドロビン 2. Trafficの95%をPod1~3のラウン ドロビンにし、5%をPod4へ 図の下部①と②
1. Pod1~3へのラウンドロビン 2. UAがAndroidであればPod1へ、 iPhoneであればPod4へ、その他 はラウンドロビンにする
Acrchitecture
Envoy サービスメッシュのイン/アウトバウントの 全てのトラフィックを管理するプロキシ サーバ。各サービスにサイドカーとしてデ プロイします。 引用:https://istio.io/docs/concepts/what-is-istio/overview.html
Mixer Envoyから各サービスのデータを収集し、 サービスメッシュ全体のアクセス制御をや ポリシーをコントロールするプラットフォー ムに依存しないコンポーネントです。プラ グインモデルを取っており、柔軟なカスタ マイズが可能です。 引用:https://istio.io/docs/concepts/what-is-istio/overview.html
Pilot サービスディスカバリやトラフィック管理を 担当。Kubernetesの場合、サービスディ スカバリはWatch APIによるEnvoyのス テータス変更を検知することで実現してい ます。 引用:https://istio.io/docs/concepts/what-is-istio/overview.html
Istio-Auth KubernetesのService Accountを利用し たユーザ認証や、サービス間のTLS相互 認証を行います。この認証を利用するこ とで、ポリシーベースでサービスメッシュ を管理することができます。また、将来的 には属性・ロールベースでのアクセス制 御などが追加される予定です。 引用:https://istio.io/docs/concepts/what-is-istio/overview.html
Demo
Bookinfo • Istio公式サンプル ◦ https://istio.io/docs/guides/bookinfo.html ◦ 4つのPodで構成されたマイクロサービスなアプリケーション ◦ Ver0.5を使用:https://github.com/istio/istio/releases/tag/0.5.0 •
プラットフォームにGKEを使用 ◦ https://cloud.google.com/kubernetes-engine/docs/tutorials/istio-on-g ke
Bookinfo • オンラインブックストアを模したものである • 本に関する情報を掲載 ◦ 書籍説明、ISBN・ページ数、レビュー
Bookinfo
Bookinfo without Istio • Product Page ◦ DetailsとReviewsを呼び 出し商品情報に埋め込む •
Details ◦ 書籍情報 • Reviews(v1-v3) ◦ 書籍レビュー ◦ v1: rating無し ◦ v2: ratingを黒い★で表示 ◦ v3: ratingを赤い★で表示 • Ratings ◦ 書籍評価 引用:https://istio.io/docs/guides/bookinfo.html
Bookinfo with Istio • 各サービスにEnvoyをサイドカーコ ンテナとしてデプロイ • Envoyが全ての通信をプロキシす る •
インバウンドだけでなく、アウトバ ウンドも管理できる 引用:https://istio.io/docs/guides/bookinfo.html
Install Istio • リリースページからIstioのパッケージをDL • 展開してディレクトリ内に移動 • GKEにIstioをデプロイ ◦ export
PATH=$PWD/bin:$PATH ◦ kubectl apply -f install/kubernetes/istio-auth.yaml
Deploy Bookinfo • BookinfoとIstioの機能を一緒にデプロイ ◦ kubectl apply -f <(istioctl kube-inject
-f samples/bookinfo/kube/bookinfo.yaml)
Confirm Bookinfo • curl -I http://{ADDRESS}/productpage ◦ もしくは、open http://{ADDRESS}/productpage •
Bookinfoが表示される • アクセスする度にラウンドロビンでレーティング表示が変化
RouteRule Match cookieに`user=review-2`を含んでいれ ば、リクエストをReviews-v2に固定する istioctl create -f samples/bookinfo/kube/route-rule-revi ews-cookie-1.yaml
RouteRule Match cookieに`user=review-2`を含んでいれ ば、リクエストをReviews-v2に固定する 引用:https://istio.io/docs/guides/bookinfo.html
まとめ Kubernetesへ組み込みが簡単で、手軽に動作検証することができました。 Nginxと役割が重なる部分もありますが、動的に反映できる点やアウトバウンド制御 でき、より高度なコントロールを可能にしてくれると思います。 今回紹介しなかった、トレーシングダッシュボードであるZipkinやJaegerと組み合わ せるとさらに便利になるでしょう。 今後がとても楽しみなプロダクトでした。
More Decks by Masaki Iino
See All by Masaki Iino
GCP Composer
iinomasaki
0
270
AnyPay ChatOps
iinomasaki
0
1.2k
GolangでAPIドキュメント自動生成
iinomasaki
0
780
LT_Cloud_Functions.pdf
iinomasaki
1
610
Other Decks in Technology
See All in Technology
【AWS reInvent 2026 関西組 事前勉強会】二度あることは三度ある~調子に乗りそうな3回目の私を戒めたいです~
ttelltte
0
110
あの日、見つかっていなかったらどうなっていたか
kazzpapa3
2
260
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
cdkdがどんだけ早いか、実際に動かして見てみよう
smt7174
1
130
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
170
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
210
Biohub - Cell Tracking During Development 5th place solution
rist
0
180
PHPで家庭用ゲーム機の専用コントローラーをMIDIデバイスとして扱ってみる
wind111
0
150
re:Inventを楽しむために、 1日1つ「これが楽しみ」を決めよう
beli68
0
120
閉域網でのAPI公開の選択肢全部比較!
takano0131
4
560
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
3
250
変更差分を読むために環境を整備しよう
pipepasta
1
470
Featured
See All Featured
How to make the Groovebox
asonas
2
2.6k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
How to Ace a Technical Interview
jacobian
280
24k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
610
The Curse of the Amulet
leimatthew05
4
17k
Designing for humans not robots
tammielis
254
26k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
810
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
670
Why Our Code Smells
bkeepers
PRO
340
58k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
330
Statistics for Hackers
jakevdp
799
230k