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
大規模コンピューティングを支える Kubernetes のネットワーク
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Honahuku
July 05, 2024
420
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
大規模コンピューティングを支える Kubernetes のネットワーク
第4回分散システム集会で発表したときの資料です
https://distributed.connpass.com/event/321792/
Honahuku
July 05, 2024
More Decks by Honahuku
See All by Honahuku
WSL2 の \\wsl$ はどう動いているのか
honahuku
0
99
Kubernetes のスケーラビリティを左右するデータストアの話
honahuku
0
120
KubeCon + CloudNativeCon Japan 2025 に行ってきた! & containerd の新機能紹介
honahuku
0
220
「改訂版ブルーム・タキソノミー」を利用したソフトウェアドキュメンテーションの改善手法の提案
honahuku
0
880
Kubernetes のクラスタ内ネットワーク概要
honahuku
1
97
エンジニアでも論文が読みたい!
honahuku
0
1.3k
今から始める分散システム
honahuku
0
360
SecAd~Ad data drivin’ network security~
honahuku
0
270
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.6k
Producing Creativity
orderedlist
PRO
348
41k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
260
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Raft: Consensus for Rubyists
vanstee
142
7.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Odyssey Design
rkendrick25
PRO
2
860
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Thoughts on Productivity
jonyablonski
76
5.4k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
450
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
Transcript
大規模コンピューティングを支える Kubernetes のネットワーク 第4回分散システム集会 @honahuku
自己紹介 Honahuku(ほなふく) 第4回分散システム集会 • 7月からGKEを使った広告の部 署に異動に • 梅雨で頭が痛いが頑張る • 好きな色の折りたたみ傘を見つ
けてうきうき • オフィスの近くで食べた「食べる 豚汁」が美味しかった • 次の土曜日は三重にセキュリ ティ・ミニキャンプのチューター として行ってきます 最近のトピック
分散システムとは(短縮版)
第4回分散システム集会 • 複数ノードにおいて処理を分散して行うもの(ほなふくが勝手に 定義) • ジョブ型とコンテナ型(ほなふくが勝手に定義) • ユーザーからのリクエストを受け付けるか • k8s
は web リクエストを受け付けることが多い 分散システムとは [1] Slurm Workload Manager [2] Slurm Workload Manager
kubernetes のネットワーク
第4回分散システム集会 • インターネットから Nodeにトラフィック が流れてくる • どのマシンでも同じよ うにコンテナが動いて ほしい •
→ Pod は Node と 独立したネットワーク を持ち、 Pod ごとに IP が振られる k8s でのユーザーリクエストの処理 [3] Pod へのトラフィック
外からのトラフィックは直接 Node に送信される?
第4回分散システム集会 • Pod は揮発する ◦ Node の調子が悪くなったときに別 の Node に退避したい
• Service は Pod に対するアクセスを 抽象化する ◦ 外からのトラフィック以外にもクラス タ内の他のリソースから Pod にアク セスすることもある • Pod とは独立したネットワークを持ち、 Service ごとに IP が振られる Service という概念 [3] Service と Pod
(Service は) Pod と独立した ネットワークを持つ??
第4回分散システム集会 Node と Service と Pod [4] k8s のネットワーク
k8s の中ではめちゃくちゃ ネットワークが分離されている (overlay network)
誰が提供するのこれ
\\ CNI // (Container Network Interface)
第4回分散システム集会 CNI [5] k8s と CNI
第4回分散システム集会 CNI
なるほどわからん
第4回分散システム集会 • CNI は k8s 以外でも使える ◦ Linux コンテナ向けのネットワークの仕様とライブ ラリ
• CNIの k8s 向け実装は Network Plugin と呼ばれ る[10] • k8s では overlay network を提供する[11] ◦ Pod へ IP を振ったり ◦ Service へ IP を振ったりする • VXLAN や IP-in-IP で動いてる [5] CNI
第4回分散システム集会 • Service は実態として kube-proxy というやつがいい 感じにしている ◦ ノードに流れてきた Pod
向けのトラフィックを Pod に流す • kube-proxy はクラスタの外から CNI plugin までを 繋いでいる • ネットワークを抽象化(≒仮想化)することによって k8s のコンポーネントがネットワークを k8s の API とかの仕 組み上でいじれるようになってる ◦ 代わりにオーバーヘッドもある[4] CNI plugin と Service
まとめ
第4回分散システム集会 • overlay network により Pod 間 や Service 間
で NAT をせずに疎通できる(他にも色々やってくれる) • これは CNI Plugin により提供される • overlay network までのトラフィックは kube-proxy が繋ぎこむ まとめ [7] [8]
参考文献
参考文献 第4回分散システム集会 • [1] Slurm Workload Manager https://slurm.schedmd.com/ • [2]
Kubernetes https://kubernetes.io/ • [3] ネットワークの概要 https://cloud.google.com/kubernetes-engine/docs/concepts/network-overview • [4] コンテナネイティブロードバランシングの話 / A story about container native load balancing https://speakerdeck.com/inductor/a-story-about-container-native-load-balancing • [5] Assessing Container Network Interface Plugins: Functionality, Performance, and Scalability https://doi.org/10.1109/TNSM.2020.3047545 • [6]久々に社内勉強会で発表するので資料を公開します https://blog.inductor.me/entry/container-native-load-balancing • [7]Kubernetes Components https://kubernetes.io/docs/concepts/overview/components/ • [8]CNI - the Container Network Interface https://github.com/containernetworking/cni • [9]ふくねっと Vol.1 https://booth.pm/ja/items/5399365 • [10]Network Plugins https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/ne twork-plugins/ • [11]The Kubernetes network model https://kubernetes.io/docs/concepts/services-networking/#the-kubernetes-netwo rk-model