summaryrefslogtreecommitdiffstats
path: root/utils/k8s_setup/k8s_config_pre.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/k8s_setup/k8s_config_pre.sh')
-rw-r--r--utils/k8s_setup/k8s_config_pre.sh14
1 files changed, 14 insertions, 0 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