12 lines
244 B
Bash
Executable file
12 lines
244 B
Bash
Executable file
#!/usr/bin/env sh
|
|
has_command kubectl || {
|
|
echo "kubectl command not found"
|
|
exit 1
|
|
}
|
|
|
|
kubectl get namespaces --show-labels | \
|
|
uniq | \
|
|
sort | \
|
|
cut -d ' ' -f1 | \
|
|
fzf | \
|
|
xargs -I{} kubectl config set-context --current --namespace='{}'
|