Say, I have two namespaces k8s-app1 and k8s-app2
I can list all pods from specific namespace using the below command
kubectl get pods -n
I created a function in .zshrc
ksns() { kubectl config set-context --current --namespace="$1" }
Then I call ksns default
ksns default