Skip to content

Commit

Permalink
Upgraded K8s cicd to k8s v1.29.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-netlox committed Mar 5, 2024
1 parent c8f2ede commit 50bcbfc
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 56 deletions.
16 changes: 8 additions & 8 deletions cicd/k8s-calico-ipvs/node_scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sudo apt-get update -y
# Install CRI-O Runtime

VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')"

CRIO_VERSION=1.27
# Create the .conf file to load the modules at bootup
cat <<EOF | sudo tee /etc/modules-load.d/crio.conf
overlay
Expand Down Expand Up @@ -57,11 +57,11 @@ sudo sysctl --system
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /
EOF
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /
EOF

curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -

sudo apt-get update
Expand All @@ -76,12 +76,12 @@ sudo systemctl enable crio --now
echo "CRI runtime installed successfully"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
sudo apt-get install -y apt-transport-https ca-certificates curl gpg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update -y
sudo apt-get install -y kubelet="$KUBERNETES_VERSION" kubectl="$KUBERNETES_VERSION" kubeadm="$KUBERNETES_VERSION"
sudo apt-get install -y kubelet kubectl kubeadm
sudo apt-get update -y
sudo apt-get install -y jq
sudo apt-get install -y ipvsadm
Expand Down
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs/yaml/kubeadm-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ etcd:
local:
dataDir: /var/lib/etcd
imageRepository: registry.k8s.io
kubernetesVersion: v1.27.5
kubernetesVersion: v1.29.2
networking:
dnsDomain: cluster.local
podSubnet: 172.16.1.0/16
Expand Down
3 changes: 2 additions & 1 deletion cicd/k8s-calico-ipvs/yaml/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ software:
version: 0.7.1
cluster:
box: bento/ubuntu-22.04
version: 202401.31.0
calico: 3.26.0
# To skip the dashboard installation, set its version to an empty value or comment it out:
kubernetes: 1.27.1-00
kubernetes: 1.29.2
os: xUbuntu_22.04
25 changes: 25 additions & 0 deletions cicd/k8s-calico-ipvs2-ha-ka-sync/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,28 @@ sudo sysctl net.ipv4.conf.vboxnet1.arp_accept=1
vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/tcp_fullnat.yml' 2> /dev/null
vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/sctp_fullnat.yml' 2> /dev/null
#vagrant ssh master -c 'kubectl apply -f https://raw.githubusercontent.com/loxilb-io/kube-loxilb/main/manifest/mesh/loxilb-mesh.yml' 2> /dev/null
for((i=1; i<=60; i++))
do
fin=1
pods=$(vagrant ssh master -c 'kubectl get pods -A' 2> /dev/null | grep -v "NAMESPACE")

while IFS= read -a pods; do
read -a pod <<< "$pods"
if [[ ${pod[3]} != *"Running"* ]]; then
echo "${pod[1]} is not UP yet"
fin=0
fi
done <<< "$pods"
if [ $fin == 1 ];
then
echo "Cluster is ready"
break;
fi
echo "Will try after 10s"
sleep 10
done

if [[ $fin == 0 ]]; then
echo "Cluster is not ready"
exit 1
fi
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs2-ha-ka-sync/host_validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ echo "Testing Service"
echo "*********************************************"

# iperf client accessing fullnat service
stdbuf -oL nohup iperf -c 192.168.80.5 -p 56002 -t 60 -i 1 -b 100M &> iperff.out &
stdbuf -oL nohup iperf -c 192.168.80.5 -p 56002 -t 100 -i 1 -b 100M &> iperff.out &
echo "iperf client started"
echo "phase-1 done"
16 changes: 8 additions & 8 deletions cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sudo apt-get update -y
# Install CRI-O Runtime

VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')"

CRIO_VERSION=1.27
# Create the .conf file to load the modules at bootup
cat <<EOF | sudo tee /etc/modules-load.d/crio.conf
overlay
Expand Down Expand Up @@ -60,11 +60,11 @@ sudo sysctl --system
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /
EOF
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /
EOF

curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -

sudo apt-get update
Expand All @@ -79,12 +79,12 @@ sudo systemctl enable crio --now
echo "CRI runtime installed successfully"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
sudo apt-get install -y apt-transport-https ca-certificates curl gpg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update -y
sudo apt-get install -y kubelet="$KUBERNETES_VERSION" kubectl="$KUBERNETES_VERSION" kubeadm="$KUBERNETES_VERSION"
sudo apt-get install -y kubelet kubectl kubeadm
sudo apt-get update -y
sudo apt-get install -y jq
sudo apt-get install -y ipvsadm
Expand Down
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/loxilb1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce
docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --net=host --name loxilb ghcr.io/loxilb-io/loxilb:latest --cluster=192.168.80.253 --self=0 --ka=192.168.80.253
docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --net=host --name loxilb ghcr.io/loxilb-io/loxilb:latest --cluster=192.168.80.253 --self=0 --ka=192.168.80.253:192.168.80.252
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/loxilb2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce
docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --net=host --name loxilb ghcr.io/loxilb-io/loxilb:latest --cluster=192.168.80.252 --self=1 --ka=192.168.80.252
docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --net=host --name loxilb ghcr.io/loxilb-io/loxilb:latest --cluster=192.168.80.252 --self=1 --ka=192.168.80.252:192.168.80.253
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs2-ha-ka-sync/yaml/kubeadm-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ etcd:
local:
dataDir: /var/lib/etcd
imageRepository: registry.k8s.io
kubernetesVersion: v1.27.5
kubernetesVersion: v1.29.2
networking:
dnsDomain: cluster.local
podSubnet: 172.16.1.0/16
Expand Down
3 changes: 2 additions & 1 deletion cicd/k8s-calico-ipvs2-ha-ka-sync/yaml/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ software:
version: 0.7.1
cluster:
box: bento/ubuntu-22.04
version: 202401.31.0
calico: 3.26.0
# To skip the dashboard installation, set its version to an empty value or comment it out:
kubernetes: 1.27.1-00
kubernetes: 1.29.2
os: xUbuntu_22.04
25 changes: 25 additions & 0 deletions cicd/k8s-calico-ipvs2/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,28 @@ sudo sysctl net.ipv4.conf.vboxnet1.arp_accept=1
#Create fullnat Service
vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/tcp_fullnat.yml' 2> /dev/null
vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/udp_fullnat.yml' 2> /dev/null
for((i=1; i<=60; i++))
do
fin=1
pods=$(vagrant ssh master -c 'kubectl get pods -A' 2> /dev/null | grep -v "NAMESPACE")

while IFS= read -a pods; do
read -a pod <<< "$pods"
if [[ ${pod[3]} != *"Running"* ]]; then
echo "${pod[1]} is not UP yet"
fin=0
fi
done <<< "$pods"
if [ $fin == 1 ];
then
echo "Cluster is ready"
break;
fi
echo "Will try after 10s"
sleep 10
done

if [[ $fin == 0 ]]; then
echo "Cluster is not ready"
exit 1
fi
16 changes: 8 additions & 8 deletions cicd/k8s-calico-ipvs2/node_scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sudo apt-get update -y
# Install CRI-O Runtime

VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')"

CRIO_VERSION=1.27
# Create the .conf file to load the modules at bootup
cat <<EOF | sudo tee /etc/modules-load.d/crio.conf
overlay
Expand Down Expand Up @@ -57,11 +57,11 @@ sudo sysctl --system
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /
EOF
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /
EOF

curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -

sudo apt-get update
Expand All @@ -76,12 +76,12 @@ sudo systemctl enable crio --now
echo "CRI runtime installed successfully"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
sudo apt-get install -y apt-transport-https ca-certificates curl gpg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update -y
sudo apt-get install -y kubelet="$KUBERNETES_VERSION" kubectl="$KUBERNETES_VERSION" kubeadm="$KUBERNETES_VERSION"
sudo apt-get install -y kubelet kubectl kubeadm
sudo apt-get update -y
sudo apt-get install -y jq
sudo apt-get install -y ipvsadm
Expand Down
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs2/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ do
done

## Any routing updates ??
sleep 30
#sleep 30

echo Service IP : $extIP
echo -e "\nEnd Points List"
Expand Down
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs2/yaml/kubeadm-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ etcd:
local:
dataDir: /var/lib/etcd
imageRepository: registry.k8s.io
kubernetesVersion: v1.27.5
kubernetesVersion: v1.29.2
networking:
dnsDomain: cluster.local
podSubnet: 172.16.1.0/16
Expand Down
3 changes: 2 additions & 1 deletion cicd/k8s-calico-ipvs2/yaml/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ software:
version: 0.7.1
cluster:
box: bento/ubuntu-22.04
version: 202401.31.0
calico: 3.26.0
# To skip the dashboard installation, set its version to an empty value or comment it out:
kubernetes: 1.27.1-00
kubernetes: 1.29.2
os: xUbuntu_22.04
16 changes: 8 additions & 8 deletions cicd/k8s-calico-ipvs3-ha/node_scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sudo apt-get update -y
# Install CRI-O Runtime

VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')"

CRIO_VERSION=1.27
# Create the .conf file to load the modules at bootup
cat <<EOF | sudo tee /etc/modules-load.d/crio.conf
overlay
Expand Down Expand Up @@ -57,11 +57,11 @@ sudo sysctl --system
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /
EOF
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /
EOF

curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -

sudo apt-get update
Expand All @@ -76,12 +76,12 @@ sudo systemctl enable crio --now
echo "CRI runtime installed successfully"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
sudo apt-get install -y apt-transport-https ca-certificates curl gpg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update -y
sudo apt-get install -y kubelet="$KUBERNETES_VERSION" kubectl="$KUBERNETES_VERSION" kubeadm="$KUBERNETES_VERSION"
sudo apt-get install -y kubelet kubectl kubeadm
sudo apt-get update -y
sudo apt-get install -y jq
sudo apt-get install -y ipvsadm
Expand Down
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs3-ha/yaml/kubeadm-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ etcd:
local:
dataDir: /var/lib/etcd
imageRepository: registry.k8s.io
kubernetesVersion: v1.27.5
kubernetesVersion: v1.29.2
networking:
dnsDomain: cluster.local
podSubnet: 172.16.1.0/16
Expand Down
3 changes: 2 additions & 1 deletion cicd/k8s-calico-ipvs3-ha/yaml/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ software:
version: 0.7.1
cluster:
box: bento/ubuntu-22.04
version: 202401.31.0
calico: 3.26.0
# To skip the dashboard installation, set its version to an empty value or comment it out:
kubernetes: 1.27.1-00
kubernetes: 1.29.2
os: xUbuntu_22.04
16 changes: 8 additions & 8 deletions cicd/k8s-calico-ipvs3/node_scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sudo apt-get update -y
# Install CRI-O Runtime

VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')"

CRIO_VERSION=1.27
# Create the .conf file to load the modules at bootup
cat <<EOF | sudo tee /etc/modules-load.d/crio.conf
overlay
Expand Down Expand Up @@ -57,11 +57,11 @@ sudo sysctl --system
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /
EOF
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /
cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /
EOF

curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg add -

sudo apt-get update
Expand All @@ -76,12 +76,12 @@ sudo systemctl enable crio --now
echo "CRI runtime installed successfully"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
sudo apt-get install -y apt-transport-https ca-certificates curl gpg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update -y
sudo apt-get install -y kubelet="$KUBERNETES_VERSION" kubectl="$KUBERNETES_VERSION" kubeadm="$KUBERNETES_VERSION"
sudo apt-get install -y kubelet kubectl kubeadm
sudo apt-get update -y
sudo apt-get install -y jq
sudo apt-get install -y ipvsadm
Expand Down
2 changes: 1 addition & 1 deletion cicd/k8s-calico-ipvs3/yaml/kubeadm-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ etcd:
local:
dataDir: /var/lib/etcd
imageRepository: registry.k8s.io
kubernetesVersion: v1.27.5
kubernetesVersion: v1.29.2
networking:
dnsDomain: cluster.local
podSubnet: 172.16.1.0/16
Expand Down
3 changes: 2 additions & 1 deletion cicd/k8s-calico-ipvs3/yaml/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ software:
version: 0.7.1
cluster:
box: bento/ubuntu-22.04
version: 202401.31.0
calico: 3.26.0
# To skip the dashboard installation, set its version to an empty value or comment it out:
kubernetes: 1.27.1-00
kubernetes: 1.29.2
os: xUbuntu_22.04
1 change: 1 addition & 0 deletions cicd/k8s-calico/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ do
done

if [[ $fin == 0 ]]; then
echo "Cluster is not ready"
exit 1
fi
Loading

0 comments on commit 50bcbfc

Please sign in to comment.