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
「L3以下は魔法で動いている!」と言いながらiptablesとkube-proxyを読んでみた話
Search
RyuSA
December 22, 2020
Technology
180
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
「L3以下は魔法で動いている!」と言いながらiptablesとkube-proxyを読んでみた話
社内LTでKubernetesのServiceを少し深堀した話を再編
RyuSA
December 22, 2020
More Decks by RyuSA
See All by RyuSA
Java屋だってOperatorが作りたい!
ryusa
1
620
Visual Studio Codeとコンテナでいい感じのRe:View執筆環境
ryusa
1
1.6k
JavaScriptと歩くポリシーエンジン jsPolicy
ryusa
1
610
TextAlive App APIと夢見る新しいUX
ryusa
1
470
Gitlab Operatorと夢見るGitlab自動化の旅
ryusa
2
1.1k
AccessPoint Operator on Raspberry Pi
ryusa
1
1.3k
Serviceをたずねて3000行 - Kubernetesコードリーディングの旅 -
ryusa
2
960
そのAPIはセキュアですか?
ryusa
2
870
「〇〇完全に理解したったww」から始めるエンジニア生活
ryusa
2
4.6k
Other Decks in Technology
See All in Technology
「とりあえず動く」の先へ。 AI時代のチーム開発と内部設計/2026-slsdays
slsops
0
130
[2026 Oracle Technical Deep Dive] エンタープライズAIエージェントを支えるOCIソリューション。ラインナップと特徴を理解しよう! (2026年9月17日開催)
oracle4engineer
PRO
0
360
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
310
IR Today: Theory, Practice, and Agents
dtunkelang
0
340
Deep Data Security 機能解説
oracle4engineer
PRO
2
650
ファミコンでPHPを動かす / PHP on the Famicom side b
tomzoh
0
130
LLM機能を自作して分かるSnowflake Cortex AIの強み
nayuts
0
250
ミイダス株式会社 テックチームのご紹介 / MIIDAS Tech Team
miidas
0
110
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
230
メルカリにおけるAI時代の高速プロトタイピング基盤「Arca」
ryotarai
18
14k
オブザーバビリティを高める AI エージェント体験を考える / Designing AI Agent Experiences That Enhance Observability
aoto
PRO
2
260
Lambda MicroVMsが分からなすぎたので使い所を1から考えてみた
tsukuboshi
2
330
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
290
The World Runs on Bad Software
bkeepers
PRO
72
12k
How to make the Groovebox
asonas
2
2.5k
Being A Developer After 40
akosma
91
590k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
The Limits of Empathy - UXLibs8
cassininazir
1
700
Done Done
chrislema
187
17k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Exploring anti-patterns in Rails
aemeredith
4
520
Transcript
と言いながら iptablesと kube-proxyを読んでみた話 L3以下は魔法で動いている!!!
本日のおはなし
Service なにもわからない
知っていること - Serviceはkube-proxyが深くかかわっている - Serviceはデフォルトでiptablesを使っているらしい - L3以下は魔法で動いている 知らないこと - iptablesの使いどころさん
- kube-proxyが何をしている?
実際に見てみる
(DeploymentとServiceを作成) Podを3つとSvcを作成
Workerノードのiptablesを眺める
iptables わからん \(^o^)/ 我、アプリ(?)の人間ぞ??
None
送信元192.168.0.0/16 から 送信先10.109.35.24/32 宛の TCPを転送しているっぽい?
送信元192.168.0.0/16 から 送信先10.109.35.24/32 宛の TCPを転送しているっぽい? nginxサービスのIPアドレス Kubeadmで設定したPodSubnet
None
確率で3つの場所に転送している……?
None
転送の最終宛先は各PodのIPアドレス
TCP発射 ↓ SvcのIPアドレス着弾 ↓ 確率(静的)分散 ↓ DNAT ↓ (魔法が発動する) ↓
PodのIPアドレスに転送
完全に理解した (なにもわかっていない)
ということでkube-proxy読んできた
None
None
更新処理
None
eventhandlers?
None
iptablesのProxiser
None
同期している?
None
どこかで初期化されているはず
None
これが走る
None
それっぽくない?
None
確率計算とレコード追加 Endpoint一覧をforで回す PodへのDNAT
完全に理解した (なにもわからなくなった)
おしまい