Create a manifest file with command for deployment in Kubernet
To deploy an Nginx application in Kubernetes, create a manifest file using the command “kubectl create deployment ngnix –image=ngnix –dry-run=client -o yaml > deploymentngnix.yaml.” Deploy the pod with “kubectl apply -f deploymentngnix.yaml,” verify using “kubectl get pods,” and delete resources with “kubectl delete -f deployment.yaml.”
Following command is used to create a manifest file and save as yaml
kubectl create deployment ngnix --image=ngnix --dry-run=client -0 yaml > deploymentngnix.yaml
This will generate a deploymentngnix.yaml file
Deploy the pod from the yaml file
kubectl apply -f deploymentngnix.yaml
Verify the pod
kubectl get pods
Delete all resources in the manefest
kubectl delete -f deployment.yaml