08 Enhance deployment.yaml
To skip having to specify the -n
every time you do a deployment, the namespace can be included in the deployment.
Perform the steps below, to do this.
- Add a line to
deployment.yml
under the topmetadata
(remember indentation) withnamespace: studentx
- Deploy the app again by running
kubectl apply -f deployment.yml
- See the deployment now happens in the namespace you just specified in the yaml file, instead of in the command, by running
kubectl get all -n studentx
- Delete the deployment again by running
kubectl delete -f deployment.yml