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
Skaffoldを使ってみた
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
hhiroshell
April 28, 2018
Technology
2.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Skaffoldを使ってみた
「あつまれ! CI/CDツール大集合! - cndjp第5回」での発表資料です。Skaffoldの役割や使い方をまとめました。
hhiroshell
April 28, 2018
More Decks by hhiroshell
See All by hhiroshell
Maximizing Launch Reliability: Controlled Lift-off for Reliable Application Startup on Kubernetes
hhiroshell
0
92
Kubernetes Multi-tenancy: Principles and Practices for Large Scale Internal Platforms
hhiroshell
0
270
Platform Engineering from the CNCF Perspective
hhiroshell
0
93
Maximizing the Launch Reliability: Ensuring Stable Application Lift-off and Orbit on Kubernetes
hhiroshell
0
130
CNCFの視点で捉えるPlatform Engineering - 最新動向と展望 / Platform Engineering from the CNCF Perspective
hhiroshell
0
410
Cloud Native Scalability for Internal Developer Platforms
hhiroshell
5
940
LINEヤフーにおける超大規模プラットフォーム実現への挑戦と学び / Challenges and Lessons in Building an Ultra-Large-Scale Platform at LY Corporation
hhiroshell
3
1.9k
Architecting Kubernetes-Based Internal Developer Platforms: Essential Patterns and Practices
hhiroshell
0
340
Discover Your Tailored Platform Strategy with Real-World Practice
hhiroshell
1
320
Other Decks in Technology
See All in Technology
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
9
4.5k
映像変換サーバーなしで端末内でHLSを生成してライブ配信
hikarusato
0
130
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
27
16k
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
180
beyond jj: config & tools ecosystem
indirect
0
3.4k
あるけみー式LTスライド作成術
alchemy1115
2
220
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
6
2.9k
AIエージェントの権限管理 3: Agentic RAG の Fine grained access control 編
ren8k
0
100
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
130
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
210
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
170
JSONataとAWS Step Functionsで目指すRuntimelessな世界
mu7889yoon
0
140
Featured
See All Featured
The Curse of the Amulet
leimatthew05
3
15k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
A Modern Web Designer's Workflow
chriscoyier
699
190k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
Color Theory Basics | Prateek | Gurzu
gurzu
1
470
Crafting Experiences
bethany
1
340
A designer walks into a library…
pauljervisheath
211
25k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
580
Designing for humans not robots
tammielis
254
26k
Transcript
Cloud Native Developers JP Skaffoldを使ってみた @hhiroshell 1
Cloud Native Developers JP Skaffoldとは • Kubernetesに乗せるアプリケーションの開発作業を省力化してくれ るコマンドラインツール – https://github.com/GoogleContainerTools/skaffold
• Googleのエンジニアを中心に開発されているOSS – Apache License 2.0 • 2018年3月発表。最新バージョンはv0.5.0(2018/04/25現在) • 類似のツールに、Draft、keelというものがあるらしい 2
Cloud Native Developers JP 3 動作確認するだけでも結構手間がかかる…。 Kubernetesにのせるアプリを開発するときの作業 1 アプリの コードを編集
2 コンテナ イメージの Build 3 コンテナ レジストリへ Push 4 Kubernetesへ Deploy くりかえし
Cloud Native Developers JP 4 動作確認するだけでも結構手間がかかる…。 Kubernetesにのせるアプリを開発するときの作業 1 アプリの コードを編集
2 コンテナ イメージの Build 3 コンテナ レジストリへ Push 4 Kubernetesへ Deploy くりかえし K8sであるが故に必要な作業(面倒くさい)
Cloud Native Developers JP 2 Build 3 Push 4 Deploy
Skaffold Pipeline • Build, Push, Deployの各フェーズで、必要なコマンドを順次自動実 行してくれるイメージ • らくちん! 5 面倒なBuild, Push, DeployをSkaffoldで自動化 > docker build > docker push > kubectl apply
Cloud Native Developers JP 2 Build 3 Push 4 Deploy
Skaffoldのプラグインアーキテクチャ • dockerコマンドとkubectlを自動化する使い方 6 各フェーズの実態をプラグイン的に変更できる > docker build > docker push > kubectl apply Google Container Builder Google Container Registry > helm install
Cloud Native Developers JP > docker build > docker push
> kubectl apply Google Container Builder Google Container Registry > helm install Skaffoldのプラグインアーキテクチャ • GKEとhelmの場合 7 各フェーズの実態をプラグイン的に変更できる 2 Build 3 Push 4 Deploy
Cloud Native Developers JP 2 Build 3 Push 4 Deploy
Skaffoldのプラグインアーキテクチャ • PushなしでKubernetesにデプロイ。ローカル開発で便利 8 各フェーズの実態をプラグイン的に変更できる > docker build > docker push > kubectl apply Google Container Builder Google Container Registry > helm install
Cloud Native Developers JP Demo(基本編) ローカル開発で使う 9
Cloud Native Developers JP skaffold dev と skaffold run •
> skaffold dev – コンソールのフォアグラウンドに常駐 – コンテナイメージの依存ファイルに対する変更を検知して、Skaffold Pipeline を自動で実行してくれる – 開発中のコンテナの標準出力を自動でtailする • > skaffold run – – Skaffold Pipelineを一度だけ実行して終わる – CI/CDの中で使うときや、アプリ開発が一段落した後のサニティチェックと して 10 ローカル開発ではdevの方を積極的に活用しよう
Cloud Native Developers JP skaffold.yaml ① imageNameでイメージ名を指 定(タグは自動で付与) ② デフォルトではworkspace直下
のDockerfileをビルド ③ skipPosh: trueによりコンテナ レジストリへのプッシュ不要で 直接k8sにデプロイ ④ デプロイ時は、manifestsに指 定したファイルを kubectl apply してくれる 11 Pipelineの定義ファイル 1 apiVersion: skaffold/v1alpha2 2 kind: Config 3 build: 4 artifacts: 5 - imageName: gcr.io/k8s-skaffold/skaffold-example 6 workspace: . 7 local: 8 skipPush: true 9 deploy: 10 kubectl: 11 manifests: 12 - k8s-* 13 profiles: 14 - name: gcb 15 build: 16 googleCloudBuild: 17 projectId: k8s-skaffold … ① … ② … ③ … ④
Cloud Native Developers JP skaffold.yaml ⑤ profileによって複数の Pipelineを切替えられる – この例ではGoogle
Container Builderでk8s-skaffoldプロジェ クトをビルド – > scaffold run -p gcb 12 Pipelineの定義ファイル 1 apiVersion: skaffold/v1alpha2 2 kind: Config 3 build: 4 artifacts: 5 - imageName: gcr.io/k8s-skaffold/skaffold-example 6 workspace: . 7 local: 8 skipPush: true 9 deploy: 10 kubectl: 11 manifests: 12 - k8s-* 13 profiles: 14 - name: gcb 15 build: 16 googleCloudBuild: 17 projectId: k8s-skaffold … ⑤
Cloud Native Developers JP Demo(やってみた編) Jnekinsと組合せて使う 13
Cloud Native Developers JP 使ってみた感想 • 安定しているとは言えない – かなり頻繁にアップデートされている(発表から2ヶ月で v0.1.0
→ v0.5.0) – 約1週間使い込んだところ、バグと思しき挙動に2つ遭遇 – v0.xだからか、マイナーバージョンアップでも仕様が変わることがある • とはいえ一度動かしきればメリットは大きい – チーム開発に影響しない範囲で、個人として導入するには賛成 – コーディングが実に捗る • 他のツールも試してみたい – Draft、keel – 参考: 「SkaffoldとDraftを比べてみた」https://qiita.com/watawuwu/items/7f5e287c91e5eab30419 14 ローカル開発で積極的に使っていきたい
Cloud Native Developers JP Fin. 15