updated .envrc-kubernetes

pull/2/head
Hari Sekhon 4 years ago
parent b5f349e519
commit 7953c5a38b

@ -35,8 +35,14 @@ epoch="$(date +%s)"
export KUBECONFIG="$tmpdir/config.${EUID:-${UID:-$(id -u)}}.$$.$epoch"
# load your real kube config to isolated staging area to source the context info
if [ -f "$original_kubeconfig" ]; then
#cp ~/.kube/config "$KUBECONFIG"
cp "$original_kubeconfig" "$KUBECONFIG"
elif [ -f "$PWD/.kube/config" ]; then
cp "$PWD/.kube/config" "$KUBECONFIG"
else
echo "WARNING: failed to find either $original_kubeconfig or $PWD/.kube/config"
fi
# XXX: replace MYCONTEXT
kubectl config use-context MYCONTEXT

Loading…
Cancel
Save