DEV Community


Posted on


Answer: shortcut for typing kubectl --all-namespaces everytime

Is there any alias we can make for all-namespace

Based on this excellent SO answer you can create alias that inserts arguments between prefix and suffix like so:

alias kca='f(){ kubectl "$@" --all-namespaces -o wide;  unset -f f; }; f'

and then use it regularly like so:

kca get nodes

Top comments (0)

Advice For Junior Developers

Advice from a career of 15+ years for new and beginner developers just getting started on their journey.