abrochard / kubel

Emacs extension for controlling Kubernetes with limited permissions
GNU General Public License v3.0
259 stars 41 forks source link

Choose ALL namespaces #111

Open pierupaa opened 1 year ago

pierupaa commented 1 year ago

CLI tool k9s has a nice feature to show resources in all namespaces, which is nice if you have a bunch of namespaces and resources, and need to do cluster level things like cluster updates.

abrochard commented 1 year ago

That's pretty cool! Do you know how it does it? Is there a special kubectl command or API to get all resources from all namespaces? Or does it just iterate through all namespaces and then gets all resources?

d1egoaz commented 1 year ago

That's pretty cool! Do you know how it does it? Is there a special kubectl command or API to get all resources from all namespaces? Or does it just iterate through all namespaces and then gets all resources?

example:

kubectl get pods --all-namespaces --context <context>
linktohack commented 1 year ago

That feature is implemented here https://github.com/linktohack/kubel/commit/bdf20c1077dad697be0ddda99455739cb08788be

I reuse kubel-namespace with a prefix but you may want to add a new variable instead.