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
Kiro 入門 (1 つのエージェントを、どの画面からでも) | 目指せ Kiro マスター 01
inariku
PRO
6
1.8k
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
6
4.9k
AI時代の組織作り:チーム開発から「個人×AI」への移行と、持続可能な「開発資本」の築き方
ham0215
3
840
変更差分を読むために環境を整備しよう
pipepasta
1
340
Shared Signals Framework 仕様解説
oidfj
0
440
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
440
自治体AIコンタクトセンター、何をどこに任せる?~Amazon Connect Customer +Amazon Bedrockの実践知~ / 20261107 Satoshi Torano
shift_evolve
PRO
1
140
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
2
170
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
iwamot
PRO
5
340
Steering と Hook (チームの決まりを守らせる) | 目指せ Kiro マスター 06
inariku
PRO
2
130
狙われているAPIの脆弱性!今こそ手をつけるべき根本的な対策とは?
nagix
0
130
Frontier Teams — Amazon は AI で「開発のやり方」をどう変えたのか
kmotohas
0
270
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Exploring anti-patterns in Rails
aemeredith
4
570
sira's awesome portfolio website redesign presentation
elsirapls
0
510
Utilizing Notion as your number one productivity tool
mfonobong
4
640
Un-Boring Meetings
codingconduct
0
500
WCS-LA-2024
lcolladotor
0
1k
Being A Developer After 40
akosma
PRO
92
590k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
3.9k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
610
Producing Creativity
orderedlist
PRO
348
41k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
940