<p>I have K8s deployed on an EC2 based cluster,<br>
There is an application running in the deployment, and I am trying to figure out the manifest files that were used to create the resources,<br>
There were deployment, service and ingress files used to create the App setup.<br></p>

<p>I tried the following command, but I'm not sure if it's the correct one as it's also returning a lot of unusual data like <code>lastTransitionTime</code>, <code>lastUpdateTime</code> and <code>status</code>-<br></p>

<pre><code>kubectl get deployment -o yaml
</code></pre>

<p>What is the correct command to view the manifest yaml files of an existing deployed resource?</p>

<p>There is no specific way to do that. You should store your source files in source control like any other code. Think of it like decompiling, you can do it, but what you get back is not the same as what you put in. That said, check for the last-applied annotation, if you use <code>kubectl apply</code> that would have a JSON version of a more original-ish manifest, but again probably with some defaulted fields.</p>
