Useful Commands to Automatically Create YAML Configs
Create a Declarative YAML for a Pod
kubectl run nginxpod --image=nginx --dry-run=client -o yaml > ngpod.yaml
cat ngpod.yaml
Create a YAML for a Deployment
kubectl create deployment ngdep --image=nginx --dry-run=client -o yaml > ngdep.yaml