Skip to content

Instantly share code, notes, and snippets.

@jack4it
Created November 24, 2019 03:41
Show Gist options
  • Save jack4it/7821e8729dff0bb995a2bd596a786859 to your computer and use it in GitHub Desktop.
Save jack4it/7821e8729dff0bb995a2bd596a786859 to your computer and use it in GitHub Desktop.
# kubeconfig per session
file="$(mktemp -t "kubectx.XXXXXX")"
export KUBECONFIG="${file}:${KUBECONFIG}"
cat <<EOF >"${file}"
apiVersion: v1
kind: Config
current-context: ""
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment