Init Container Orderingとは?
init containerは、podのメインcontainerが始まる前に完了まで実行されるセットアップ用containerで、記載された順序どおりに厳密に実行されます。それぞれが正常に終了してから次が始まり、いずれかが失敗するとシーケンスが再起動します。これにより、migrationやconfigの取得といった前提条件が最初に実行されることが保証されます。
なぜ重要か
順序付けにより、アプリが起動する前にデータベースを待つといったセットアップの依存関係を表現できます。順序が誤っていたり遅かったりするinit containerは、あらゆるpodの起動を遅らせ、deployを停滞させることがあります。
関連ガイド
What Is Sidecar Proxy Injection?Sidecar proxy injection automatically adds a proxy container alongside each app container so a service mesh c…
What Is Pod Priority?Pod priority is a numeric value attached to a pod that tells the scheduler how important it is, influencing s…
What Are Requests and Limits?Requests and limits are the two values that declare how much CPU and memory a container is guaranteed and how…