From 01b5a9968c31a22f610e73332a8563d620caaea9 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 13 Jan 2024 02:01:17 +0100 Subject: upgrade k8s clusters --- inventory/group_vars/k8s-chtest/vars.yml | 2 +- inventory/group_vars/k8s-emc/vars.yml | 2 +- roles/kubernetes/kubeadm/upgrade | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/inventory/group_vars/k8s-chtest/vars.yml b/inventory/group_vars/k8s-chtest/vars.yml index c6e9552e..ced61a29 100644 --- a/inventory/group_vars/k8s-chtest/vars.yml +++ b/inventory/group_vars/k8s-chtest/vars.yml @@ -1,7 +1,7 @@ --- kubernetes_node_name: "{{ inventory_hostname | replace('ch-', '') }}" -kubernetes_version: 1.27.1 +kubernetes_version: 1.28.5 kubernetes_container_runtime: containerd containerd_pkg_provider: docker-com diff --git a/inventory/group_vars/k8s-emc/vars.yml b/inventory/group_vars/k8s-emc/vars.yml index 9a6f8b56..3ad30e4c 100644 --- a/inventory/group_vars/k8s-emc/vars.yml +++ b/inventory/group_vars/k8s-emc/vars.yml @@ -1,7 +1,7 @@ --- kubernetes_node_name: "{{ inventory_hostname | replace('ele-', '') }}" -kubernetes_version: 1.26.1 +kubernetes_version: 1.28.5 kubernetes_container_runtime: containerd containerd_pkg_provider: docker-com kubernetes_network_plugin: kubeguard diff --git a/roles/kubernetes/kubeadm/upgrade b/roles/kubernetes/kubeadm/upgrade index eb54ab17..d08471f6 100644 --- a/roles/kubernetes/kubeadm/upgrade +++ b/roles/kubernetes/kubeadm/upgrade @@ -4,9 +4,9 @@ Cluster Upgrades: primary control-plane node: --------------------------- -VERSION=1.24.3 - +VERSION=1.28.5 +sed "s#/v[0-9.]*/deb/#/v${VERSION%.*}/deb/#" -i /etc/apt/sources.list.d/kubernetes.list apt-get update sed "s/^Pin: version .*$/Pin: version $VERSION-*/" -i /etc/apt/preferences.d/kubeadm.pref apt-get install -y "kubeadm=$VERSION-*" @@ -29,8 +29,9 @@ kubectl uncordon $(hostname) secondary control-plane node: ----------------------------- -VERSION=1.24.3 +VERSION=1.28.5 +sed "s#/v[0-9.]*/deb/#/v${VERSION%.*}/deb/#" -i /etc/apt/sources.list.d/kubernetes.list apt-get update sed "s/^Pin: version .*$/Pin: version $VERSION-*/" -i /etc/apt/preferences.d/kubeadm.pref apt-get install -y "kubeadm=$VERSION-*" @@ -49,8 +50,9 @@ kubectl uncordon $(hostname) worker nodes: ------------- -VERSION=1.24.3 +VERSION=1.28.5 +sed "s#/v[0-9.]*/deb/#/v${VERSION%.*}/deb/#" -i /etc/apt/sources.list.d/kubernetes.list apt-get update sed "s/^Pin: version .*$/Pin: version $VERSION-*/" -i /etc/apt/preferences.d/kubeadm.pref apt-get install -y "kubeadm=$VERSION-*" -- cgit v1.2.3