K8S_VERSION=1.30
K8S_PACKAGE_VERSION="$K8S_VERSION".1-1.1
+K8S_METRICS_VERSION="v0.7.1"
# installs kubernetes packages
function install_kube() {
[ -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
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
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,