X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=installers%2Finstall_kubeadm_cluster.sh;fp=installers%2Finstall_kubeadm_cluster.sh;h=8df461907d0c17c9f51acb5927d243edacf9f8c2;hb=44cb851caff361e3b7ff360ce2b80d0ff5d57faf;hp=c64e28f372de2231585dc3ca1e3b99ca7661af06;hpb=ef3f37c5e0d5995055f8484bc282dcb3a8d1817e;p=osm%2Fdevops.git diff --git a/installers/install_kubeadm_cluster.sh b/installers/install_kubeadm_cluster.sh index c64e28f3..8df46190 100755 --- a/installers/install_kubeadm_cluster.sh +++ b/installers/install_kubeadm_cluster.sh @@ -17,6 +17,7 @@ set +eux K8S_VERSION=1.30 K8S_PACKAGE_VERSION="$K8S_VERSION".1-1.1 +K8S_METRICS_VERSION="v0.7.1" # installs kubernetes packages function install_kube() { @@ -108,6 +109,15 @@ function check_and_track_k8s_ready_before_helm() { [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } +# removes osm deployments and services +function install_k8s_metrics() { + [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function + echo "Installing Kubernetes metrics" + kubectl apply -f "https://github.com/kubernetes-sigs/metrics-server/releases/${K8S_METRICS_VERSION}/download/components.yaml" + kubectl -n kube-system patch deployment metrics-server --type=json -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]' + [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function +} + # removes osm deployments and services function remove_k8s_namespace() { [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function @@ -115,7 +125,6 @@ function remove_k8s_namespace() { kubectl delete ns $1 2>/dev/null [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } - # main while getopts ":D:d:i:-: " o; do case "${o}" in @@ -171,6 +180,8 @@ deploy_cni_provider taint_master_node check_and_track_k8s_ready_before_helm +install_k8s_metrics + remove_k8s_namespace osm # install_helm has been moved to install_helm_client.sh, run from full_install_osm.sh,