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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
IR Today: Theory, Practice, and Agents
dtunkelang
0
350
[2026 Oracle Technical Deep Dive] エンタープライズAIエージェントを支えるOCIソリューション。ラインナップと特徴を理解しよう! (2026年9月17日開催)
oracle4engineer
PRO
0
540
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
220
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
140
[2026 Oracle Technical Deep Dive] AI時代のアプリケーションを支えるCloud NativeとJava EEモダナイゼーション (2026年9月17日開催)
oracle4engineer
PRO
0
120
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
470
全社共通データ基盤をつくる。ソニーのDatabricks活用とデータガバナンス設計の裏側
sony
0
430
自主式軟體工廠
philipz
0
230
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
720
Kernel testing frameworks
ennael
PRO
0
110
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
300
自分で立ててみるLLMサービス
y_sera15
0
120
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Paper Plane
katiecoart
PRO
4
53k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Documentation Writing (for coders)
carmenintech
77
5.6k
Scaling GitHub
holman
464
140k
How to train your dragon (web standard)
notwaldorf
96
6.8k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
530
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
390
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
A designer walks into a library…
pauljervisheath
211
25k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
420
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
完全に理解した (なにもわからなくなった)
おしまい