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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
RyuSA
December 22, 2020
Technology
190
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
Transcript
37 slides
と言いながら 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
完全に理解した (なにもわからなくなった)
おしまい
More Decks by RyuSA
See All by RyuSA
Java屋だってOperatorが作りたい!
ryusa
1
630
Visual Studio Codeとコンテナでいい感じのRe:View執筆環境
ryusa
1
1.6k
JavaScriptと歩くポリシーエンジン jsPolicy
ryusa
1
620
TextAlive App APIと夢見る新しいUX
ryusa
1
490
Gitlab Operatorと夢見るGitlab自動化の旅
ryusa
2
1.1k
AccessPoint Operator on Raspberry Pi
ryusa
1
1.3k
Serviceをたずねて3000行 - Kubernetesコードリーディングの旅 -
ryusa
2
970
そのAPIはセキュアですか?
ryusa
2
880
「〇〇完全に理解したったww」から始めるエンジニア生活
ryusa
2
4.7k
Other Decks in Technology
See All in Technology
ぼくのClaude Codeの使い方
falken
PRO
1
3.5k
DevOps Agentにあらゆるセキュリティインシデントのトリアージを任せた件
jirtosterone
1
120
Kiro Crew の Bot (続く役目を任せる窓口) | 目指せ Kiro マスター 12
inariku
PRO
2
370
並列度を下げたら速くなった — go build の重複コンパイルを実測で見る
tomoaki25
2
1.2k
自治体AIコンタクトセンター、何をどこに任せる?~Amazon Connect Customer +Amazon Bedrockの実践知~ / 20261107 Satoshi Torano
shift_evolve
PRO
1
130
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
4
1.8k
AI Agent 時代のデータ基盤: ClickHouse で実現する 超高速分析とコスト削減の両立
jozono
0
230
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
DBTS2026 盛り上がってますか!?Databricksが実現するAI時代のデータ基盤
akuwano
1
200
ライフワーク「猫でもわかるDirectConnect」
kentapapa
0
320
Microsoft Entra Kerberos で実現するクラウド デバイス管理
tamaiyutaro
2
670
SREのためのFinOps入門
muziyoshiz
3
1.4k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
400
Thoughts on Productivity
jonyablonski
76
5.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Designing for Performance
lara
612
70k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880
Producing Creativity
orderedlist
PRO
348
41k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k