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
There are a few options:
kubectl config set-context --current --namespace=
kubectl config set-context gce-dev --user=cluster-admin --namespace=dev
kubectl config use-context gce-dev
kube-system
:$ kubens kube-system
$ alias kubens='kubectl config set-context --current --namespace '
$ alias kubectx='kubectl config use-context '
// Usage
$ kubens kube-system //Switch to a different namespace
$ kubectx docker //Switch to separate context