--- GA: UA-34467841-15 --- # 秒級 Code Sandbox 實戰:Compose→K8s Init - 宋政隆 (clsung) ###### tags: `KubeSummit2025` `K8s2025` `2025` `kubernetes` `DE 會議室` `K8s 導入實戰` `K8s 優化` `容器資安` <blockquote> 我們從單機 Docker Compose MVP 起步,雖能快速驗證功能,卻卡在 docker cross-platform build, root 權限與 5 秒冷啟延遲。遷移至 Kubernetes 後,先踩 exec/tar race 與 pods/exec 過權,延遲仍破 4 秒。最終改用 InitContainer + emptyDir,在主容器前完成解碼/解壓,消除 race 並強化隔離。再透過 gzip、預拉映像、og profiling,把 init 從 4.8 秒壓到 1.1 秒、整體降至約 2 秒。現場分享相關的程式碼與 YAML,並延伸討論 Warm-Pool、TTL Job、OTel Trace 等進階優化途徑。 《聽眾收穫》 聽眾將學會用 log 或 Tracing 診斷 Pod 延遲熱點,掌握 InitContainer + emptyDir 的最小權限實作與 gzip/預拉映像的效能-成本取捨,同時得到涵蓋 docker.sock 移除、pods/exec 精簡與資源 request 控制的 Sandbox 安全建議做法。 </blockquote> {%hackmd @k8ssummit/announcement-2025 %} ## 會議資訊 **時間:** 15:10 ~ 15:40 **地點:** DE 會議室 **日期:** 2025年10月23日 **語言:** 中文 **難度:** 通識 **相關連結:** - [KubeSummit 2025 官方網站](https://k8s.ithome.com.tw/2025) [target=_blank] - [KubeSummit 2025 議程表](https://k8s.ithome.com.tw/2025/agenda) [target=_blank] ## 筆記區 > 請從這裡開始記錄你的筆記 ## 討論區 > 歡迎在此進行討論與 Q&A ## 相關資源 - 投影片連結:(待講者提供) - 相關文件:[Github](https://github.com/clsung/ithome_2025_kubesummit_talk)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up