OS Manuals

/usr/bin/kubens

Faster way to switch between clusters and namespaces in kubectl

From kubectx 0.11.0-r17 (enterprise-packages), captured 2026-11-08 by running kubens --help (exit 0). permalink

Switch between Kubernetes namespaces.

USAGE:
  kubens                    : list the namespaces in the current context
  kubens <NAME>             : change the active namespace of current context
  kubens <NAME> --force/-f  : force change the active namespace of current context (even if it doesn't exist)
  kubens -                  : switch to the previous namespace in this context
  kubens -c, --current      : show the current namespace
  kubens -h,--help          : show this message
  kubens -u,--unset         : unset the namespace choice (set to 'default')
  kubens -V,--version       : show version

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.