![Forrest logo](/images/logo.png)
kubens:tldr:3e073
The command "kubens" is a shorthand for "kubectl config use-context" command in Kubernetes.
In Kubernetes, a "context" is a cluster, user, and namespace combination. It defines the cluster that kubectl configures and interacts with. The "kubectl config" command is used to manage these contexts.
The "kubens" command allows users to quickly switch between namespaces within a context without specifying the entire context every time. When you run "kubens", it provides a list of available namespaces and prompts you to select the one you want to switch to. Once you make your selection, "kubens" internally runs "kubectl config use-context
This command is helpful when you are working with multiple namespaces and want to easily switch back and forth without explicitly typing the entire "kubectl config use-context" command each time.