ahmetb / kubectl-tree

kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)
Apache License 2.0
2.95k stars 120 forks source link

Get current namespace #10

Closed feloy closed 4 years ago

feloy commented 4 years ago

The command gets the default namespace if none if specified.

The normal behaviour would be to get the current namespace.

Fixes #1

ahmetb commented 4 years ago

Thank you. 🙏 Does this respect —kubeconfig flag and KUBECONFIG env var as well? Please manually verify.

feloy commented 4 years ago

Thank you. Does this respect —kubeconfig flag and KUBECONFIG env var as well? Please manually verify.

Yes, I just manually verified, that works with KUBECONFIG and --kubeconfig flag.

ahmetb commented 4 years ago

Nice, respect.

I dislike genericclioptions require so much extra code to do this but I guess this is the way.