<p>How to find the location of a kubernetes object's definition file.
I know the name of a kubernetes deployment and want to make some changes directly to its definition file instead of using 'kubernetes edit deployment '</p>

vaibhav kalyani
<p>The object definitions are stored internally in Kubernetes in replicated storage that's not directly accessible.  If you do change an object definition, you would still need to trigger the rest of the Kubernetes update sequence when an object changes.</p>
<p>Typical practice is to keep the Kubernetes YAML files in source control.  You can then edit these locally, and use <code>kubectl apply -f</code> to send them to the cluster.  If you don't have them then you can run commands like <code>kubectl get deployment depl-name -o yaml</code> to get them out, and then check in the results to your source control repository.</p>
<p>If you really want to edit YAML definitions in an imperative, non-reproducible way, <code>kubectl edit</code> is the most direct thing you can do.</p>
