mirror of
https://github.com/bvanroll/_dotfiles.git
synced 2025-08-29 20:12:42 +00:00
11 lines
367 B
Bash
Executable File
11 lines
367 B
Bash
Executable File
#!/usr/bin/env bash
|
|
KCONTEXT=$(kubectl config current-context 2>/dev/null)
|
|
if [[ $?=="0" ]]; then
|
|
CC=$(kubectl config view -ojsonpath='{..current-context}')
|
|
KNAMESPACE=$(kubectl config view -ojsonpath="{.Contexts[?(@.Name==\"$CC\")]..namespace}")
|
|
echo "☸ $KCONTEXT/$KNAMESPACE ☸"
|
|
echo "☸ $KCONTEXT/$KNAMESPACE ☸"
|
|
echo \#4040FF # color
|
|
fi
|
|
|