Is it possible to create an yaml file out of existing deployment?

Gagan:
Is it possible to create an yaml file out of existing deployment?

vishwanath:
Kubectl get deployment deploymentname -o yaml> file.yaml

Try this

Gagan:
yup, thanks