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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
4
1.5k
形式手法特論:Hyperproperty とモデル検査 #kernelvm / Kernel VM Study Tokyo 19th
ytaka23
1
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.6k
形式手法特論:CEGAR を用いたモデル検査の状態空間削減 #kernelvm / Kernel VM Study Hokuriku Part 8
ytaka23
3
940
形式手法特論:位相空間としての並行プログラミング #kernelvm / Kernel VM Study Tokyo 18th
ytaka23
3
2.6k
AWS と定理証明 〜ポリシー言語 Cedar 開発の舞台裏〜 #fp_matsuri / FP Matsuri 2025
ytaka23
12
6.8k
問 1:以下のコンパイラを証明せよ(予告編) #kernelvm / Kernel VM Study Kansai 11th
ytaka23
3
1.3k
Other Decks in Technology
See All in Technology
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
900
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
0
130
Meet AgentCore Identity Consent Portal
hironobuiga
3
190
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
220
ミイダス株式会社 テックチームのご紹介 / MIIDAS Tech Team
miidas
0
170
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
150
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
560
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
3
4.6k
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
520
UniFi(ユニファイ)AIカメラの現場活用
ludicmind
1
190
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
190
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
450
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
How GitHub (no longer) Works
holman
316
150k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Faster Mobile Websites
deanohume
310
32k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
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