<p>I know when Pod's lifecycle hooks are executed, but even after reading the official docs (<a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/" rel="nofollow noreferrer">this</a>) I am not able to figure out when &quot;Command and Arguments&quot; execute, does anyone know?</p>
<hr />
<p>UPDATE 1:
I want to know specifically that at what point &quot;Command and Argument&quot; gets executed - is it before container creation starts or in parallel to container creations?</p>

pjj
<p>When you create a pod using kubectl, then kube-apiserver stores the Pod definition in the etcd store.</p>
<p>Then the kube-scheduler updates the pod definition with the nodeName on which it should run</p>
<p>Then the kubelet system Daemon running on that nodeName takes the Pod Definition and asks the Container Runtime like Docker to create the Containers mentioned in the Pod Definition.</p>
<p>Then the Container Runtime like Docker creates the Container and When the Container Starts at that time, the Command is run with the Arguments as the first process of the Container.</p>
<p>If you inspect the Container on the NodeName then you will see that the container Entrypoint contains the Command and Arguments defined in the spec of the container inside the pod spec.</p>
