Ign:
how do you approach working on a different namespace
? Do you always pass the -n
parameter or do you configure the default namespace?
chris resnik:
-n is the fastest
the solution videos are good in that respect. put the -n parameter as one of the first so you don’t forget about it
R Banerjee:
you can configure the default namespace using the kubectl config command
kubectl config set-context $(kubctl config current-context) -- namespace=$NAMESPACE_YOUWANT_TO_DEFAULT_TO
But yes, if you are working on multiple namespaces, -n
Shwetha Shenoy V:
The main disadvantage of setting it on the context as I see is that you may forget that and execute the commands on the wrong namespace for the next question in the exam.
R Banerjee:
thats true … better not run kubectl delete