<p>I want to know the time it takes to start my pod in Kubernetes. My pod has <code>3 Init Containers</code> and <code>9 actual Containers</code>.
Here's what I have tried so far:</p>
<ul>
<li><em><strong>Approach 1:</strong></em> Start the pod and monitor until there are 9/9 containers running. The <code>AGE</code> in <code>kubectl describe pod &lt;pod_name&gt;</code> will give an idea for startup time.</li>
<li><em><strong>Approach 2:</strong></em> Refer to the events for the pod using <code>kubectl events</code> or <code>kubectl describe</code> command. The problem is events are not there for all containers. Also, there is no clear way to understand the time taken by pod to be in <code>READY</code> state.</li>
</ul>
<p><a href="https://i.stack.imgur.com/dFY3J.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dFY3J.png" alt="enter image description here" /></a></p>
<p><strong>Question:</strong> Does Kubernetes provide any way to determine the whole pod startup time?</p>

<p>As things begin to set up, your pod will progress through a set of <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions" rel="noreferrer">PodConditions</a>.</p>
<p>You could use:</p>
<pre><code>kubectl get po &lt;pod_name&gt; -o yaml
</code></pre>
<p>to observe the progression through these various conditions:</p>
<pre><code>...
  conditions:
  - lastProbeTime: null
    lastTransitionTime: &quot;2020-09-09T08:47:11Z&quot;
    status: &quot;True&quot;
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: &quot;2020-09-09T08:47:12Z&quot;
    status: &quot;True&quot;
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: &quot;2020-09-09T08:47:12Z&quot;
    status: &quot;True&quot;
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: &quot;2020-09-09T08:47:11Z&quot;
    status: &quot;True&quot;
    type: PodScheduled
...
</code></pre>
<p>If you want to automatically parse all of this in a shell, I'd recommend <a href="https://github.com/mikefarah/yq" rel="noreferrer"><code>yq</code></a>
for the actual YAML parsing.</p>
