how can we identify and locate the pod definition files of any specific pod that is running
kubectl get pods lists about 7 pods running, I am looking forward to identify the pod definition yaml file
kubectl run mypod --image=nginx --dry-run=client -oyaml>mypod.yaml
The above should work, unless its a static pod. If it is, then you will likely find the pod manifest located at /etc/kubernetes/manifests
This is the default location that kubelet looks for the static pod files
In case, if pod is already running.
kubectl get po <pod-name> -oyaml
If want to store in a file then use " > file.yaml" in the end.