Skip to content

Commit

Permalink
updated kubernetes.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Sep 1, 2024
1 parent acd90b9 commit a28acd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ kube_current_context(){

kube_current_namespace(){
kubectl config get-contexts |
awk "/$(kube_current_context)/ {print \$NF}"
{ grep -F "$(kube_current_context)" || die "Failed to get current context"; } |
awk '{print $NF}'
}

kube_namespace(){
Expand Down

0 comments on commit a28acd4

Please # to comment.