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
AWS CDK との比較で見る cdk8s / cdk8s+ の現在地 #k8sjp / Ku...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
y_taka_23
August 26, 2020
Technology
1.7k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS CDK との比較で見る cdk8s / cdk8s+ の現在地 #k8sjp / Kubernetes Meetup Tokyo 33rd
Kubernetes Meetup Tokyo #33 で使用したスライドです。
y_taka_23
August 26, 2020
More Decks by y_taka_23
See All by y_taka_23
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
0
300
形式手法特論:Hyperproperty とモデル検査 #kernelvm / Kernel VM Study Tokyo 19th
ytaka23
1
1k
形式手法特論:公平性制約の位相的特徴づけ #kernelvm / Kernel VM Study Kansai 12th
ytaka23
1
1.1k
形式手法特論:SMT ソルバで解く認可ポリシの静的解析 #kernelvm / Kernel VM Study Tsukuba No3
ytaka23
1
1.3k
形式手法特論:コンパイラの「正しさ」は証明できるか? #burikaigi / BuriKaigi 2026
ytaka23
17
8.5k
形式手法特論:CEGAR を用いたモデル検査の状態空間削減 #kernelvm / Kernel VM Study Hokuriku Part 8
ytaka23
3
930
形式手法特論:位相空間としての並行プログラミング #kernelvm / Kernel VM Study Tokyo 18th
ytaka23
3
2.5k
AWS と定理証明 〜ポリシー言語 Cedar 開発の舞台裏〜 #fp_matsuri / FP Matsuri 2025
ytaka23
12
6.7k
問 1:以下のコンパイラを証明せよ(予告編) #kernelvm / Kernel VM Study Kansai 11th
ytaka23
3
1.2k
Other Decks in Technology
See All in Technology
[2026-09-11]SREは誰のもの?運用エンジニアが始める 「SRE領域への越境」とチームの進化の軌跡 〜Road to NEXT CRE
tosite
0
290
Railsのように考える: See through the Master
snoozer05
PRO
4
970
リアーキテクチャ後の障害ゼロを目指したShadow Testingの取り組み
nihonbuson
PRO
1
110
2026_devsumi_ozono.pdf
o3
3
510
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.3k
Genieを崇めよ
kameitomohiro
0
160
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
160
AIエージェントの自己改善をどう設計するか / How to Design Self-Improvement for AI Agents
22mi
25
16k
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
4
220
映像変換サーバーなしで端末内でHLSを生成してライブ配信
hikarusato
0
120
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
9
4.3k
HHKBエバンジェリストになる方法
941
0
110
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Thoughts on Productivity
jonyablonski
76
5.4k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Google's AI Overviews - The New Search
badams
0
1.6k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
350
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Site-Speed That Sticks
csswizardry
13
1.5k
Ethics towards AI in product and experience design
skipperchong
2
380
Transcript
AWS CDK との比較で見る cdk8s / cdk8s+ の現在地 チェシャ猫 (@y_taka_23) Kubernetes
Meetup Tokyo #33 (26th Aug. 2020) #k8sjp
#k8sjp 例:静的 Web ホスティング <html>
#k8sjp 例:静的 Web ホスティング <html> serviceName servicePort selector --from-file volume
Selector port 表からは見えないが一貫性がないと動かない
\Manifest の Boilerplate 多過ぎ/ #k8sjp
#k8sjp https://github.com/awslabs/cdk8s シーディーケイツ!
YAML 嫌いのための cdk8s • 高級プログラミング言語で記述 ◦ 型検査、IDE、ライブラリ管理などが利用可能 ◦ 基本は TypeScript、その他
Python、Java、.NET • ビルドすると YAML を生成 ◦ コマンドを直接実行するわけではない(宣言的) • AWS Cloud Development Kit (CDK) 派生 ◦ リソースを Construct としてカプセル化 #k8sjp
export class MyChart extends Chart { constructor(scope: Construct, name: string)
{ super(scope, name); new Service(this, ‘mysvc’, { spec: { selector: { app: ‘myapp’ }, ports: [{ port: 80, targetPort: 8080 }] } }); } } #k8sjp
export class MyChart extends Chart { constructor(scope: Construct, name: string)
{ super(scope, name); new Service(this, ‘mysvc’, { spec: { selector: { app: ‘myapp’ }, ports: [{ port: 80, targetPort: 8080 }] } }); } } #k8sjp this (= MyChart) を親要素として 参照を貼っている YAML: MyChart Service: mysvc scope
(たいして YAML と変わらない?) #k8sjp
#k8sjp cdk8s/packages/cdk8s-plus cdk8s+
Layer 1 / Layer 2 Construct • L1 Construct ◦
生 YAML のリソースと原則 1 : 1 で対応 ◦ cdk8s に相当、AWS SDK では通常使用しない • L2 Construct ◦ 内部的に L1 を呼び出して Boilerplate を隠蔽 ◦ AWS CDK では通常こちらのレイヤを触る ◦ cdk8s+ として API 策定中(一部仮実装済み) #k8sjp
import { Deployment } from ‘cdk8s-plus’; export class MyChart extends
Chart { constructor(scope: Construct, name: string) { super(scope, name); const deploy = new Deployment(this, ‘mydeploy’) { spec: { ... } } deploy.expose({ port: 80 }); } } #k8sjp 子要素が一つのみの
import { Deployment } from ‘cdk8s-plus’; export class MyChart extends
Chart { constructor(scope: Construct, name: string) { super(scope, name); const deploy = new Deployment(this, ‘mydeploy’) { spec: { ... } } deploy.expose({ port: 80 }); } } #k8sjp 子要素が一つのみの deploy に対応する selector / port を 内部的に生成して対応づけてくれる
サポート外のリソースは自前で実装? #k8sjp
cdk8s のコード生成ツール • cdk8s import ◦ CRD の YAML を取り込んで
Construct に変換 ◦ 必要な Construct は imports 以下に出力 • jsii ◦ TypeScript の実装を他言語に変換する謎技術 ◦ もともと CDK 用だったツールを cdk8s も踏襲 ◦ 自作 Construct を多言語でライブラリ登録できる #k8sjp
プログラミング言語だから 単体テストも書ける #k8sjp
AWS CDK のテスト • Snapshot Test ◦ 生成される YAML が変化していないことを確認
• Fine-Grained Assertion ◦ 単なる等価性以上も判定できる専用ライブラリ ◦ YAML の部分一致、リソースの個数指定など • Validation ◦ Construct 生成時にパラメータをチェック #k8sjp
cdk8s のサポート状況 • Snapshot Test(利用可能) ◦ 生成される YAML が変化していないことを確認 •
Fine-Grained Assertion(Roadmap のみ) ◦ 単なる等価性以上も判定できる専用ライブラリ ◦ YAML の部分一致、リソースの個数指定など • Validation(利用可能) ◦ Construct 生成時にパラメータをチェック #k8sjp
#k8sjp \CNCF Sandbox 申請予定/
まとめ • Kubernetes Manifest 書きたくない ◦ YAML は「実装の詳細」が露出し過ぎている • cdk8s
による YAML 生成 ◦ 言語機能やエコシステムに乗ることができる • AWS CDK より未成熟だが使用感は近い ◦ L2 Construct と テストの充実が今後の課題か #k8sjp
DEMO:静的 Web ホスティング #k8sjp https://github.com/y-taka-23/cdk8s-hosting
Construct Your Cool Constructs! Presented by チェシャ猫 (@y_taka_23) #k8sjp