<p>I would like to understand when pods are in a pending state because required resources aren't available to them to be scheduled..Is there a way to track time that pods are spending in "Pending" or "Scheduled" states?</p>

<p><code>lastTransitionTime</code> under the <code>status.conditions</code> field in the pod manifest shows the timestamp of each intermediate state of the pod before it reaches <code>Running</code> state.</p>

<p>Timestamps below of the pod's transition <code>Initialized -&gt; Ready -&gt; ContainersReady -&gt; PodScheduled</code>:</p>

<pre><code>$ kubectl get pod coredns-fb8b8dccf-2lhl4 -n=kube-system -o json | jq '.status.conditions'
[
  {
    "lastProbeTime": null,
    "lastTransitionTime": "2019-07-22T19:58:17Z",
    "status": "True",
    "type": "Initialized"
  },
  {
    "lastProbeTime": null,
    "lastTransitionTime": "2019-07-22T19:58:56Z",
    "status": "True",
    "type": "Ready"
  },
  {
    "lastProbeTime": null,
    "lastTransitionTime": "2019-07-22T19:58:56Z",
    "status": "True",
    "type": "ContainersReady"
  },
  {
    "lastProbeTime": null,
    "lastTransitionTime": "2019-07-22T19:58:17Z",
    "status": "True",
    "type": "PodScheduled"
  }
]

</code></pre>

<p>After a pod is initialized, it is usually in <code>Pending</code> state until it is scheduled (<code>PodScheduled</code> state above) and reaches <code>Running</code> state.</p>
