Created
January 17, 2018 02:09
-
-
Save muddydixon/0baeabff802db2380cc30ffe00fc3760 to your computer and use it in GitHub Desktop.
複数の project で kube を利用しているときのツール(要 peco)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function kubectx(){ | |
CTX=$(kubectl config get-contexts | awk 'NR>1 {print $2}' | peco) | |
if [ x${CTX} != "x" ]; then | |
kubectl config set current-context $CTX; | |
fi | |
} | |
kubectx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment