<p>When we run the below command from root user in kubernetes master node:</p>
<ul>
<li>kubectl create deployment nginx --image=nginxD</li>
</ul>
<p>on which path the yaml file gets stored ?</p>
<ul>
<li>kubectl get deployment nginx  -o yaml</li>
</ul>
<p>from which path it provides us the yaml body ?</p>

user3839347
<p>Raw k8s stores everything within etcd.  When running commands like <code>kubectl get deployment nginx -o yaml</code> kubectl talks to the kubeapi which talks to etcd to get the yaml for you.</p>
<p>etcd is a key-value store so any <code>kubectl get XYZ</code> is reading a specific key.  Any <code>kubectl create XYZ</code> is creating a new key/value within etcd.</p>
<p>Because of the importance of etcd within k8s, it is heavily recommended you back it up in production environments.</p>
<p>The components and how they talk to everything can be found here: <a href="https://kubernetes.io/docs/concepts/overview/components/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/overview/components/</a></p>
