Retrieve kubernetes deploy yaml

9/18/2019

I have deleted my deploy yaml (mistake). I need to know if kubernetes keep a copy of this file in the worker nodes. Can I get this file in any container of the worker nodes?.

  • For example I retrieve files from pods because after delete my master container of my pods there are still running in the worker nodes
-- Juan
kubernetes

1 Answer

9/18/2019

Inspect environment variables and Kubernetes deployment/service yaml

and support deployment name is hello then like you get yml change hello with deployment name

kubectl get deploy/hello -o yaml
kubectl get svc/hello -o yaml
-- harkesh kumar
Source: StackOverflow