diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/k8s_setup/k8s_config_pre.sh | 14 | ||||
-rw-r--r-- | utils/k8s_setup/kubectl_install.sh | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/utils/k8s_setup/k8s_config_pre.sh b/utils/k8s_setup/k8s_config_pre.sh index 96f714bf..38e71d23 100644 --- a/utils/k8s_setup/k8s_config_pre.sh +++ b/utils/k8s_setup/k8s_config_pre.sh @@ -64,3 +64,17 @@ if [[ ${INSTALLER_TYPE} == 'compass' ]]; then else echo "BOTTLENECKS EROOR: unrecognized installer" fi + +if [[ -f ${K8S_CONFIG} ]]; then + if [[ -d ~/.kube ]]; then + cp ${K8S_CONFIG} ~/.kube/config + echo "BOTTLENECKS INFO: copying k8s config to ~./kube" + else + mkdir ~/.kube + cp ${K8S_CONFIG} ~/.kube/config + echo "BOTTLENECKS INFO: copying k8s config to ~./kube" + fi +else + echo "BOTTLENECKS ERROR: k8s config file does no exit (${K8S_CONFIG})" + exit 1 +fi diff --git a/utils/k8s_setup/kubectl_install.sh b/utils/k8s_setup/kubectl_install.sh index 14f97f2b..22c6197b 100644 --- a/utils/k8s_setup/kubectl_install.sh +++ b/utils/k8s_setup/kubectl_install.sh @@ -9,7 +9,7 @@ ############################################################################## OS_TYPE=$(uname -a) -OS_UBUNTU=$(echo $OS_TYPE | grep ubuntu) +OS_UBUNTU=$(echo $OS_TYPE | grep Ubuntu) if [[ $OS_UBUNTU ]]; then apt-get update && apt-get install -y apt-transport-https |