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
480
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
これだけは抑えておきたい!後悔しない re:Invent の過ごし方 / AWS re:Invent 2026 prestudy
kinunori
2
590
Deep Data Security 機能解説
oracle4engineer
PRO
3
970
SLOを阻む不安
sraku2159
0
140
クラウドエージェントの先駆け Devin。今も最先端を走る、他との違い
kinopeee
1
520
データマネジメント × 法務で作りあげる、 freeeの新しいデータガバナンスへの軌跡
freee
PRO
2
580
E2Eってつらくないですか?E2Eの管理コストを下げる手段とその実践
akaboshinit
6
2.8k
なぜAI時代に技術記事を書くのか?どう書くのか? 〜bunの場合〜
kworkdev
PRO
0
1.1k
視野はAIに、視座は人に / ai-for-breadth-humans-for-perspective
nkzn
5
2.5k
ドメインエキスパートは いかにして AI を使って プロダクト開発をするか
tatsuyashiraishi
1
240
Agent × Maestro で始める モバイル E2E 端末準備からテスト実行・結果確認まで
sansantech
PRO
0
240
素人でもできた!AIを使った短編小説創作入門
delhi09
PRO
0
250
ポケモン対戦を自動で記録して振り返ろう
fufufukakaka
0
420
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
600
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
290
Evolving SEO for Evolving Search Engines
ryanjones
0
340
The Curious Case for Waylosing
cassininazir
1
590
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
660
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
960
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
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
完全に理解した (なにもわからなくなった)
おしまい