Skip to content

Instantly share code, notes, and snippets.

@joerx
Created March 27, 2019 14:04
Show Gist options
  • Save joerx/3a881fec87396f3c2d8ee0c5ea4b3fad to your computer and use it in GitHub Desktop.
Save joerx/3a881fec87396f3c2d8ee0c5ea4b3fad to your computer and use it in GitHub Desktop.
function helmns() {
ctx=`kubectl config current-context`
ns=`kubectl config view -o=jsonpath="{.contexts[?(@.name==\"$ctx\")].context.namespace}"`
echo "Using tiller-namespace $ns"
helm --tiller-namespace $ns $@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment