Last updated
Was this helpful?
Was this helpful?
export KUBECONFIG=config#!/bin/bash
unlink ~/.kube/config
list_host () {
LIST_HOST_SSH=$(ls ~/.kube/kubeconfig)
}
list_host
index=1
echo "Select kubeconfig"
for hosts in $LIST_HOST_SSH
do
echo "$index: $hosts"
LIST[$index]=$hosts
index=`expr $index + 1`
done
echo "Select : "
read index
ln -sf ~/.kube/kubeconfig/${LIST[$index]} ~/.kube/config
ls -lart ~/.kube/configkubectl proxy