Skip to content
Permalink
Browse files

Merge pull request #3 from eko/added-kimage

Added new kimage function
  • Loading branch information...
eko committed Oct 3, 2019
2 parents db45f83 + bd95b3b commit dd86e9892f9c495be7d905890f63ed79651bc316
Showing with 7 additions and 0 deletions.
  1. +7 −0 .functions
@@ -425,6 +425,13 @@ function kforward {
done
}

# Kubernetes display current image deplyed for a pod
# Usage: kimage context namespace pod-name
function kimage {
podName=`kubectl --context $1 -n $2 get pods | grep $3 | cut -d' ' -f1 | head -1`
kubectl --context $1 -n $2 describe pod/$podName | grep Image: | head -1 | cut -d':' -f2- | tr -d ' '
}

function kubernetes_image_diff {
k describe pods -n $1 --context $2 | grep Image: | cut -d':' -f2 -f3 | cut -d'/' -f2- | tr -d ' ' > /tmp/$2.diff
}

0 comments on commit dd86e98

Please sign in to comment.
You can’t perform that action at this time.